• why wolfram cannot find simple solution?

    From Nasser M. Abbasi@21:1/5 to drhu...@gmail.com on Thu Dec 10 20:54:59 2020
    On 12/10/2020 5:13 PM, drhu...@gmail.com wrote:
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2


    The solution you give to

    y'' - x y' -x y = x^2

    is
    y = 1+ c1 exp(-x)(1+x/2) - x

    But this is second order ODE. So it should have 2 constants of integrations, not one.
    I am not sure how you generated the plot there, since there is no initial conditions
    given. May be your program gave an arbitrary value to the constant.

    Also, Substituting the solution above back into the ODE does not verify the ODE.

    Mathematica gives:

    ---------------
    ClearAll[x, y];
    ode = y''[x] - y'[x]*x - y[x]*x == x^2;
    Simplify[DSolve[ode, y[x], x]]

    {{y[x] -> ((1/
    2)*(2*E^(2 + x + x^2/2)*(E^x*(1 + x + x^2) +
    Sqrt[2]*(2 + x)*C[1] + E^((1/2)*(2 + x)^2)*C[2]) -

    Sqrt[2*Pi]*
    Sqrt[(2 + x)^2]*(1 + x + x^2 + E^(2 + x + x^2/2)*C[2])*
    Erfi[Sqrt[(2 + x)^2]/Sqrt[2]] +

    2*Sqrt[2]*E^(2 + x + x^2/2)*(2 + x)*
    Inactive[
    Integrate][(E^K[1]*K[1]^2)/Sqrt[2] - (1/2)*
    E^(-2 - K[1] - K[1]^2/2)*Sqrt[Pi]*
    Erfi[Sqrt[(2 + K[1])^2]/Sqrt[2]]*K[1]^2*
    Sqrt[(2 + K[1])^2], {K[1], 1, x}]))/E^((1/2)*(2 + x)^2)}} --------------------

    And Maple gives


    restart;
    ode:=diff(y(x),x$2) -x*diff(y(x),x) - y(x)*x= x^2 ;
    dsolve(ode);

    y(x) = exp(-x)*(x + 2)*_C2 + (sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I -
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x))*_C1 - x + 1


    The standard way to sovle this ode is by Kovacic algorithm, since it
    is linear and has rational coefficients.

    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to All on Thu Dec 10 15:13:07 2020
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Nasser M. Abbasi on Fri Dec 11 12:42:19 2020
    Nasser M. Abbasi <nma@12000.org> wrote:
    On 12/10/2020 5:13 PM, drhu...@gmail.com wrote:
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2


    The solution you give to

    y'' - x y' -x y = x^2

    is
    y = 1+ c1 exp(-x)(1+x/2) - x

    But this is second order ODE. So it should have 2 constants of integrations, not one.

    AFAICS there is only one parameter family of elementery solutions.
    The other base solution of homogeneous system contins 'erfi' so
    is more complicated.

    I am not sure how you generated the plot there, since there is no initial conditions
    given. May be your program gave an arbitrary value to the constant.

    Also, Substituting the solution above back into the ODE does not verify the ODE.

    It works for me...


    Mathematica gives:

    ---------------
    ClearAll[x, y];
    ode = y''[x] - y'[x]*x - y[x]*x == x^2;
    Simplify[DSolve[ode, y[x], x]]

    {{y[x] -> ((1/
    2)*(2*E^(2 + x + x^2/2)*(E^x*(1 + x + x^2) +
    Sqrt[2]*(2 + x)*C[1] + E^((1/2)*(2 + x)^2)*C[2]) -

    Sqrt[2*Pi]*
    Sqrt[(2 + x)^2]*(1 + x + x^2 + E^(2 + x + x^2/2)*C[2])*
    Erfi[Sqrt[(2 + x)^2]/Sqrt[2]] +

    2*Sqrt[2]*E^(2 + x + x^2/2)*(2 + x)*
    Inactive[
    Integrate][(E^K[1]*K[1]^2)/Sqrt[2] - (1/2)*
    E^(-2 - K[1] - K[1]^2/2)*Sqrt[Pi]*
    Erfi[Sqrt[(2 + K[1])^2]/Sqrt[2]]*K[1]^2*
    Sqrt[(2 + K[1])^2], {K[1], 1, x}]))/E^((1/2)*(2 + x)^2)}} --------------------

    And Maple gives


    restart;
    ode:=diff(y(x),x$2) -x*diff(y(x),x) - y(x)*x= x^2 ;
    dsolve(ode);

    y(x) = exp(-x)*(x + 2)*_C2 + (sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I -
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x))*_C1 - x + 1


    The standard way to sovle this ode is by Kovacic algorithm, since it
    is linear and has rational coefficients.

    Well, looks like a flaw in Mathematica. Apparently Maple and
    FriCAS have no trouble with this equation.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nasser M. Abbasi@21:1/5 to antispam@math.uni.wroc.pl on Fri Dec 11 07:15:27 2020
    On 12/11/2020 6:42 AM, antispam@math.uni.wroc.pl wrote:
    Nasser M. Abbasi <nma@12000.org> wrote:
    On 12/10/2020 5:13 PM, drhu...@gmail.com wrote:
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2


    The solution you give to

    y'' - x y' -x y = x^2

    is
    y = 1+ c1 exp(-x)(1+x/2) - x

    But this is second order ODE. So it should have 2 constants of integrations, not one.

    AFAICS there is only one parameter family of elementery solutions.
    The other base solution of homogeneous system contins 'erfi' so
    is more complicated.

    I am not sure how you generated the plot there, since there is no initial conditions
    given. May be your program gave an arbitrary value to the constant.

    Also, Substituting the solution above back into the ODE does not verify the ODE.

    It works for me...


    You are right. I seem to have make a typo when I tried the solution
    in my worksheet and did not get a zero.

    But then this is not a general solution. A general solution should
    be linear combination of the basis functions. There should be 2 of these
    since it is second order ODE. Hence there should be 2 constants of integrations?


    Mathematica gives:

    ---------------
    ClearAll[x, y];
    ode = y''[x] - y'[x]*x - y[x]*x == x^2;
    Simplify[DSolve[ode, y[x], x]]

    {{y[x] -> ((1/
    2)*(2*E^(2 + x + x^2/2)*(E^x*(1 + x + x^2) +
    Sqrt[2]*(2 + x)*C[1] + E^((1/2)*(2 + x)^2)*C[2]) -

    Sqrt[2*Pi]*
    Sqrt[(2 + x)^2]*(1 + x + x^2 + E^(2 + x + x^2/2)*C[2])*
    Erfi[Sqrt[(2 + x)^2]/Sqrt[2]] +

    2*Sqrt[2]*E^(2 + x + x^2/2)*(2 + x)*
    Inactive[
    Integrate][(E^K[1]*K[1]^2)/Sqrt[2] - (1/2)*
    E^(-2 - K[1] - K[1]^2/2)*Sqrt[Pi]*
    Erfi[Sqrt[(2 + K[1])^2]/Sqrt[2]]*K[1]^2*
    Sqrt[(2 + K[1])^2], {K[1], 1, x}]))/E^((1/2)*(2 + x)^2)}}
    --------------------

    And Maple gives


    restart;
    ode:=diff(y(x),x$2) -x*diff(y(x),x) - y(x)*x= x^2 ;
    dsolve(ode);

    y(x) = exp(-x)*(x + 2)*_C2 + (sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I -
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x))*_C1 - x + 1


    The standard way to sovle this ode is by Kovacic algorithm, since it
    is linear and has rational coefficients.


    Well, looks like a flaw in Mathematica. Apparently Maple and
    FriCAS have no trouble with this equation.


    I need to learn how to use FriCAS to solve ODE's one day.

    Is there a specific tutorial showing examples using FriCAS syntax
    for solving ode's? Can FriCAS solve pde's?

    Thanks
    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to Nasser M. Abbasi on Fri Dec 11 18:34:12 2020
    On Friday, 11 December 2020 at 13:55:07 UTC+11, Nasser M. Abbasi wrote:
    On 12/10/2020 5:13 PM, drhu...@gmail.com wrote:
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2

    The solution you give to

    y'' - x y' -x y = x^2

    is
    y = 1+ c1 exp(-x)(1+x/2) - x

    But this is second order ODE. So it should have 2 constants of integrations, not one.
    I am not sure how you generated the plot there, since there is no initial conditions
    given. May be your program gave an arbitrary value to the constant.

    Also, Substituting the solution above back into the ODE does not verify the ODE.

    as in my last post, then click the test button to test its solution in mathHand.com to show 0.


    Mathematica gives:

    ---------------
    ClearAll[x, y];
    ode = y''[x] - y'[x]*x - y[x]*x == x^2;
    Simplify[DSolve[ode, y[x], x]]

    {{y[x] -> ((1/
    2)*(2*E^(2 + x + x^2/2)*(E^x*(1 + x + x^2) +
    Sqrt[2]*(2 + x)*C[1] + E^((1/2)*(2 + x)^2)*C[2]) -

    Sqrt[2*Pi]*
    Sqrt[(2 + x)^2]*(1 + x + x^2 + E^(2 + x + x^2/2)*C[2])*
    Erfi[Sqrt[(2 + x)^2]/Sqrt[2]] +

    2*Sqrt[2]*E^(2 + x + x^2/2)*(2 + x)*
    Inactive[
    Integrate][(E^K[1]*K[1]^2)/Sqrt[2] - (1/2)*
    E^(-2 - K[1] - K[1]^2/2)*Sqrt[Pi]*
    Erfi[Sqrt[(2 + K[1])^2]/Sqrt[2]]*K[1]^2*
    Sqrt[(2 + K[1])^2], {K[1], 1, x}]))/E^((1/2)*(2 + x)^2)}} --------------------


    this is too complicated, not simple solution.

    And Maple gives


    restart;
    ode:=diff(y(x),x$2) -x*diff(y(x),x) - y(x)*x= x^2 ;
    dsolve(ode);

    y(x) = exp(-x)*(x + 2)*_C2 + (sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I -
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x))*_C1 - x + 1


    The standard way to sovle this ode is by Kovacic algorithm, since it
    is linear and has rational coefficients.

    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Nasser M. Abbasi on Tue Dec 15 00:06:25 2020
    Nasser M. Abbasi <nma@12000.org> wrote:
    On 12/11/2020 6:42 AM, antispam@math.uni.wroc.pl wrote:
    Nasser M. Abbasi <nma@12000.org> wrote:
    On 12/10/2020 5:13 PM, drhu...@gmail.com wrote:
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2


    The solution you give to

    y'' - x y' -x y = x^2

    is
    y = 1+ c1 exp(-x)(1+x/2) - x

    But this is second order ODE. So it should have 2 constants of integrations, not one.

    AFAICS there is only one parameter family of elementery solutions.
    The other base solution of homogeneous system contins 'erfi' so
    is more complicated.

    I am not sure how you generated the plot there, since there is no initial conditions
    given. May be your program gave an arbitrary value to the constant.

    Also, Substituting the solution above back into the ODE does not verify the ODE.

    It works for me...


    You are right. I seem to have make a typo when I tried the solution
    in my worksheet and did not get a zero.

    But then this is not a general solution. A general solution should
    be linear combination of the basis functions. There should be 2 of these since it is second order ODE. Hence there should be 2 constants of integrations?

    Yes, if you want general solution.


    Mathematica gives:

    ---------------
    ClearAll[x, y];
    ode = y''[x] - y'[x]*x - y[x]*x == x^2;
    Simplify[DSolve[ode, y[x], x]]

    {{y[x] -> ((1/
    2)*(2*E^(2 + x + x^2/2)*(E^x*(1 + x + x^2) +
    Sqrt[2]*(2 + x)*C[1] + E^((1/2)*(2 + x)^2)*C[2]) -

    Sqrt[2*Pi]*
    Sqrt[(2 + x)^2]*(1 + x + x^2 + E^(2 + x + x^2/2)*C[2])*
    Erfi[Sqrt[(2 + x)^2]/Sqrt[2]] +

    2*Sqrt[2]*E^(2 + x + x^2/2)*(2 + x)*
    Inactive[
    Integrate][(E^K[1]*K[1]^2)/Sqrt[2] - (1/2)*
    E^(-2 - K[1] - K[1]^2/2)*Sqrt[Pi]*
    Erfi[Sqrt[(2 + K[1])^2]/Sqrt[2]]*K[1]^2*
    Sqrt[(2 + K[1])^2], {K[1], 1, x}]))/E^((1/2)*(2 + x)^2)}}
    --------------------

    And Maple gives


    restart;
    ode:=diff(y(x),x$2) -x*diff(y(x),x) - y(x)*x= x^2 ;
    dsolve(ode);

    y(x) = exp(-x)*(x + 2)*_C2 + (sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I -
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x))*_C1 - x + 1


    The standard way to sovle this ode is by Kovacic algorithm, since it
    is linear and has rational coefficients.


    Well, looks like a flaw in Mathematica. Apparently Maple and
    FriCAS have no trouble with this equation.


    I need to learn how to use FriCAS to solve ODE's one day.

    Is there a specific tutorial showing examples using FriCAS syntax
    for solving ode's? Can FriCAS solve pde's?

    Chapter 8.10 of FriCAS book shows needed commands. On Linux
    and Mac you can view FriCAS book using HyperDoc program included
    with FriCAS. Or you can look at .pdf online at:

    http://fricas.github.io/book.pdf


    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to drhu...@gmail.com on Wed Jan 6 16:12:40 2021
    On Friday, 11 December 2020 at 10:13:09 UTC+11, drhu...@gmail.com wrote:
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2

    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    x*y"-y-x^2=0
    x*y"-y-x^3=0
    x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%28x*ds%28y%2Cx%2C2%29-y-x%5E2%29

    http://server.drhuang.com/input/?guess=dsolve%28x*ds%28y%2Cx%2C2%29-y-x%5E3%29

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to drhu...@gmail.com on Wed Jan 6 16:40:24 2021
    On Thursday, 7 January 2021 at 11:12:41 UTC+11, drhu...@gmail.com wrote:
    On Friday, 11 December 2020 at 10:13:09 UTC+11, drhu...@gmail.com wrote:
    why wolfram cannot find simple solution in many equations? These equations have a very simple solution. e.g.
    d^2/dx^2-dy/dx *x-y*x-x^2=0
    Click the dsolve button to solve it, then click the test button to test its solution in mathHand.com.
    http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%29*x-x*y-x%5E2
    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    x*y"-y-x^2=0
    x*y"-y-x^3=0
    x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%28x*ds%28y%2Cx%2C2%29-y-x%5E2%29

    http://server.drhuang.com/input/?guess=dsolve%28x*ds%28y%2Cx%2C2%29-y-x%5E3%29


    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    1/x*y"-y-x^2=0
    1/x*y"-y-x^3=0
    1/x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%281%2Fx*ds%28y%2Cx%2C2%29-y-x%5E3%29

    so it is good idea to use two software to check solution.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nasser M. Abbasi@21:1/5 to All on Wed Jan 6 20:30:43 2021

    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    1/x*y"-y-x^2=0
    1/x*y"-y-x^3=0
    1/x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%281%2Fx*ds%28y%2Cx%2C2%29-y-x%5E3%29

    so it is good idea to use two software to check solution.


    For the first ode above. This is inhomogeneous Airy ode. The solution you give for

    1/x*y''[x]-y[x]-x^2==0

    is

    y(x)= -6+Ai(x)*C1+Bi(x)*C2-x^3

    But this solution is not verified by Maple:

    ==============
    restart;
    ode := 1/x*diff(y(x),x$2) - y(x) - x^2 = 0;
    sol := y(x) = -6+AiryAi(x)*_C2 + AiryBi(x)*_C1-x^3;
    odetest(sol,ode);

    x^3 - x^2
    =================

    Which is not zero. Hence not a valid solution?

    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to Nasser M. Abbasi on Thu Jan 7 04:28:48 2021
    On Thursday, 7 January 2021 at 13:30:51 UTC+11, Nasser M. Abbasi wrote:

    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    1/x*y"-y-x^2=0
    1/x*y"-y-x^3=0
    1/x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%281%2Fx*ds%28y%2Cx%2C2%29-y-x%5E3%29

    so it is good idea to use two software to check solution.

    For the first ode above. This is inhomogeneous Airy ode. The solution you give for

    1/x*y''[x]-y[x]-x^2==0

    is

    y(x)= -6+Ai(x)*C1+Bi(x)*C2-x^3

    But this solution is not verified by Maple:

    ==============
    restart;
    ode := 1/x*diff(y(x),x$2) - y(x) - x^2 = 0;
    sol := y(x) = -6+AiryAi(x)*_C2 + AiryBi(x)*_C1-x^3;
    odetest(sol,ode);

    x^3 - x^2
    =================

    Which is not zero. Hence not a valid solution?

    --Nasser

    the bug fixed. thanks.
    mathHand.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to drhu...@gmail.com on Thu Jan 7 04:45:36 2021
    On Thursday, 7 January 2021 at 23:28:50 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 13:30:51 UTC+11, Nasser M. Abbasi wrote:

    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    1/x*y"-y-x^2=0
    1/x*y"-y-x^3=0
    1/x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%281%2Fx*ds%28y%2Cx%2C2%29-y-x%5E3%29

    so it is good idea to use two software to check solution.

    For the first ode above. This is inhomogeneous Airy ode. The solution you give for

    1/x*y''[x]-y[x]-x^2==0

    is

    y(x)= -6+Ai(x)*C1+Bi(x)*C2-x^3

    But this solution is not verified by Maple:

    ==============
    restart;
    ode := 1/x*diff(y(x),x$2) - y(x) - x^2 = 0;
    sol := y(x) = -6+AiryAi(x)*_C2 + AiryBi(x)*_C1-x^3;
    odetest(sol,ode);

    x^3 - x^2
    =================

    Which is not zero. Hence not a valid solution?

    --Nasser
    the bug fixed. thanks.
    mathHand.com

    input your equation into mathHand.com, click the "dsolve" button to solve, then click the "test" button to test its solution, or click the "to inte" button to plot if it did not auto plot.

    http://mathHand.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to drhu...@gmail.com on Thu Jan 7 15:36:28 2021
    On Thursday, 7 January 2021 at 23:45:38 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 23:28:50 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 13:30:51 UTC+11, Nasser M. Abbasi wrote:

    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    1/x*y"-y-x^2=0
    1/x*y"-y-x^3=0
    1/x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%281%2Fx*ds%28y%2Cx%2C2%29-y-x%5E3%29

    so it is good idea to use two software to check solution.

    For the first ode above. This is inhomogeneous Airy ode. The solution you give for

    1/x*y''[x]-y[x]-x^2==0

    is

    y(x)= -6+Ai(x)*C1+Bi(x)*C2-x^3

    But this solution is not verified by Maple:

    ==============
    restart;
    ode := 1/x*diff(y(x),x$2) - y(x) - x^2 = 0;
    sol := y(x) = -6+AiryAi(x)*_C2 + AiryBi(x)*_C1-x^3;
    odetest(sol,ode);

    x^3 - x^2
    =================

    Which is not zero. Hence not a valid solution?

    --Nasser
    the bug fixed. thanks.
    mathHand.com
    input your equation into mathHand.com, click the "dsolve" button to solve, then click the "test" button to test its solution, or click the "to inte" button to plot if it did not auto plot.

    http://mathHand.com

    wolfram gives very complicated solution:
    y"-x y-x^3+2=0
    mathHand.com gives very simple solution: http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-x*y-x%5E3%2B2%29

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to drhu...@gmail.com on Fri Jan 8 17:35:13 2021
    On Friday, 8 January 2021 at 10:36:30 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 23:45:38 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 23:28:50 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 13:30:51 UTC+11, Nasser M. Abbasi wrote:

    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    1/x*y"-y-x^2=0
    1/x*y"-y-x^3=0
    1/x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%281%2Fx*ds%28y%2Cx%2C2%29-y-x%5E3%29

    so it is good idea to use two software to check solution.

    For the first ode above. This is inhomogeneous Airy ode. The solution you give for

    1/x*y''[x]-y[x]-x^2==0

    is

    y(x)= -6+Ai(x)*C1+Bi(x)*C2-x^3

    But this solution is not verified by Maple:

    ==============
    restart;
    ode := 1/x*diff(y(x),x$2) - y(x) - x^2 = 0;
    sol := y(x) = -6+AiryAi(x)*_C2 + AiryBi(x)*_C1-x^3;
    odetest(sol,ode);

    x^3 - x^2
    =================

    Which is not zero. Hence not a valid solution?

    --Nasser
    the bug fixed. thanks.
    mathHand.com
    input your equation into mathHand.com, click the "dsolve" button to solve, then click the "test" button to test its solution, or click the "to inte" button to plot if it did not auto plot.

    http://mathHand.com
    wolfram gives very complicated solution:
    y"-x y-x^3+2=0
    mathHand.com gives very simple solution: http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-x*y-x%5E3%2B2%29

    wolfram gives very complicated solution:
    y"-x y'-x y-x^3+2=0
    mathHand.com gives very simple solution: http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%2Cx%2C1%29*x-y*x-x%5E3%2B2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%2Cx%2C1%29*x-y*x-x%5E3%2B2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to drhu...@gmail.com on Sat Jan 9 18:22:33 2021
    On Saturday, 9 January 2021 at 12:35:14 UTC+11, drhu...@gmail.com wrote:
    On Friday, 8 January 2021 at 10:36:30 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 23:45:38 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 23:28:50 UTC+11, drhu...@gmail.com wrote:
    On Thursday, 7 January 2021 at 13:30:51 UTC+11, Nasser M. Abbasi wrote:

    why wolfram cannot find simple solution in many equations? many examples, e.g.:
    1/x*y"-y-x^2=0
    1/x*y"-y-x^3=0
    1/x*y"-y-x^4=0
    ......

    mathHand.com can: http://server.drhuang.com/input/?guess=dsolve%281%2Fx*ds%28y%2Cx%2C2%29-y-x%5E3%29

    so it is good idea to use two software to check solution.

    For the first ode above. This is inhomogeneous Airy ode. The solution you give for

    1/x*y''[x]-y[x]-x^2==0

    is

    y(x)= -6+Ai(x)*C1+Bi(x)*C2-x^3

    But this solution is not verified by Maple:

    ==============
    restart;
    ode := 1/x*diff(y(x),x$2) - y(x) - x^2 = 0;
    sol := y(x) = -6+AiryAi(x)*_C2 + AiryBi(x)*_C1-x^3;
    odetest(sol,ode);

    x^3 - x^2
    =================

    Which is not zero. Hence not a valid solution?

    --Nasser
    the bug fixed. thanks.
    mathHand.com
    input your equation into mathHand.com, click the "dsolve" button to solve, then click the "test" button to test its solution, or click the "to inte" button to plot if it did not auto plot.

    http://mathHand.com
    wolfram gives very complicated solution:
    y"-x y-x^3+2=0
    mathHand.com gives very simple solution: http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-x*y-x%5E3%2B2%29

    wolfram gives very complicated solution:
    y"-x y'-x y-x^3+2=0
    mathHand.com gives very simple solution: http://server.drhuang.com/input/?guess=dsolve%28ds%28y%2Cx%2C2%29-ds%28y%2Cx%2C1%29*x-y*x-x%5E3%2B2%29&inp=ds%28y%2Cx%2C2%29-ds%28y%2Cx%2C1%29*x-y*x-x%5E3%2B2


    Wolfram cannot find simple solution but mathHand.com can in following equations:
    y"-x*y'-x*y-x=0
    y"-x*y'-x*y-x^2=0
    y"-x*y'-x*y-x^3+2=0
    y"-x*y'-x*y-x^4-6=0
    y"-x*y'-x*y-x^5+12=0
    y"-x*y'-x*y-x^n=0, where n=1,2,3 ......
    y"-a*x*y'-b*x*y-c*x^n=0, where n=1,2,3 ......
    y"-y'-x*y-x=0
    y"-y'-x*y-x^2=0
    y"-y'-x*y-x^2-1=0
    y"-2*y'-x*y-x^2-2=0
    y"-4*y'-x*y-x^2-4=0
    y"-y'-x*y-x^n=0, where n=1,2,3......
    y"-a*y'-b*x*y-c*x^n=0, where n=1,2,3 ......
    y"-x*y-x^3+2=0
    y"-x*y-x^6+40=0
    y"-x*y-x^n=0, where n=1,2,3 ......
    ......

    http://drhuang.com/science/mathematics/fractional_calculus/fractional_differential_equation.htm

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nasser M. Abbasi@21:1/5 to drhu...@gmail.com on Sat Jan 9 23:13:11 2021
    On 1/9/2021 8:22 PM, drhu...@gmail.com wrote:


    Wolfram cannot find simple solution but mathHand.com can in following equations:
    y"-x*y'-x*y-x=0

    ...
    http://drhuang.com/science/mathematics/fractional_calculus/fractional_differential_equation.htm


    Hello.

    Again, it is not really fair for Mathematica to compare your solution,
    which is not a general solution, to the general solution it gives.

    Your solution is simpler, because it is not the general solution.

    Lets look at the above ode as an example. This is inhomogeneous ode.

    The homogeneous part has 2 basis function (since second order).
    The particular solution is -1.

    Your program gives this as a solution to the above ode

    y(x) = -1 + C1*exp(-x)*(x + 2)

    Which is correct.

    But it is not the general solution since in the above
    you only included one of the two basis functions. The "-1" in the
    above is the particular solution. The second basis function
    one is the complicated one.

    -----------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)=0;
    dsolve(ode,output=basis);

    exp(-x)*(x + 2) #first basis function

    #second basis function
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x) - sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I
    ----------------

    While the particular solution is

    ------------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)-x=0;
    DEtools:-particularsol(ode)

    -1
    -----------------

    So your solution is this

    y = particular solution + c1* first basis function

    While Mathematica's solution is

    y = particular solution + c1* first basis function + C2* second basis function.

    This is why your solution is simpler. But it is not the general solution.

    So this is like comparing apples to oranges, which is not fair.

    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to Nasser M. Abbasi on Sun Jan 10 01:23:08 2021
    On Sunday, 10 January 2021 at 16:13:16 UTC+11, Nasser M. Abbasi wrote:
    On 1/9/2021 8:22 PM, drhu...@gmail.com wrote:


    Wolfram cannot find simple solution but mathHand.com can in following equations:
    y"-x*y'-x*y-x=0

    ...
    http://drhuang.com/science/mathematics/fractional_calculus/fractional_differential_equation.htm


    Hello.

    Again, it is not really fair for Mathematica to compare your solution,
    which is not a general solution, to the general solution it gives.

    Your solution is simpler, because it is not the general solution.

    Lets look at the above ode as an example. This is inhomogeneous ode.

    The homogeneous part has 2 basis function (since second order).
    The particular solution is -1.

    Your program gives this as a solution to the above ode

    y(x) = -1 + C1*exp(-x)*(x + 2)

    Which is correct.

    But it is not the general solution since in the above
    you only included one of the two basis functions. The "-1" in the
    above is the particular solution. The second basis function
    one is the complicated one.

    -----------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)=0;
    dsolve(ode,output=basis);

    exp(-x)*(x + 2) #first basis function

    #second basis function
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x) - sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I
    ----------------

    While the particular solution is

    ------------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)-x=0;
    DEtools:-particularsol(ode)

    -1
    -----------------

    So your solution is this

    y = particular solution + c1* first basis function

    While Mathematica's solution is

    y = particular solution + c1* first basis function + C2* second basis function.

    This is why your solution is simpler. But it is not the general solution.

    So this is like comparing apples to oranges, which is not fair.

    --Nasser

    the bug is fixed. mathHand gives
    y = particular solution + c1* first basis function + C2* second basis function.

    mathHand.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to drhu...@gmail.com on Sun Jan 10 14:25:09 2021
    On Sunday, 10 January 2021 at 20:23:10 UTC+11, drhu...@gmail.com wrote:
    On Sunday, 10 January 2021 at 16:13:16 UTC+11, Nasser M. Abbasi wrote:
    On 1/9/2021 8:22 PM, drhu...@gmail.com wrote:


    Wolfram cannot find simple solution but mathHand.com can in following equations:
    y"-x*y'-x*y-x=0

    ...
    http://drhuang.com/science/mathematics/fractional_calculus/fractional_differential_equation.htm


    Hello.

    Again, it is not really fair for Mathematica to compare your solution, which is not a general solution, to the general solution it gives.

    Your solution is simpler, because it is not the general solution.

    Lets look at the above ode as an example. This is inhomogeneous ode.

    The homogeneous part has 2 basis function (since second order).
    The particular solution is -1.

    Your program gives this as a solution to the above ode

    y(x) = -1 + C1*exp(-x)*(x + 2)

    Which is correct.

    But it is not the general solution since in the above
    you only included one of the two basis functions. The "-1" in the
    above is the particular solution. The second basis function
    one is the complicated one.

    -----------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)=0;
    dsolve(ode,output=basis);

    exp(-x)*(x + 2) #first basis function

    #second basis function
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x) - sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I
    ----------------

    While the particular solution is

    ------------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)-x=0;
    DEtools:-particularsol(ode)

    -1
    -----------------

    So your solution is this

    y = particular solution + c1* first basis function

    While Mathematica's solution is

    y = particular solution + c1* first basis function + C2* second basis function.

    This is why your solution is simpler. But it is not the general solution.

    So this is like comparing apples to oranges, which is not fair.

    --Nasser
    the bug is fixed. mathHand gives
    y = particular solution + c1* first basis function + C2* second basis function.
    mathHand.com

    more and more examples are in http://drhuang.com/science/mathematics/fractional_calculus/fractional_differential_equation.htm

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From drhuang57@gmail.com@21:1/5 to Nasser M. Abbasi on Fri May 7 05:41:38 2021
    On Sunday, 10 January 2021 at 16:13:16 UTC+11, Nasser M. Abbasi wrote:
    On 1/9/2021 8:22 PM, drhu...@gmail.com wrote:


    Wolfram cannot find simple solution but mathHand.com can in following equations:
    y"-x*y'-x*y-x=0

    ...
    http://drhuang.com/science/mathematics/fractional_calculus/fractional_differential_equation.htm


    Hello.

    Again, it is not really fair for Mathematica to compare your solution,
    which is not a general solution, to the general solution it gives.

    Your solution is simpler, because it is not the general solution.

    Lets look at the above ode as an example. This is inhomogeneous ode.

    The homogeneous part has 2 basis function (since second order).
    The particular solution is -1.

    Your program gives this as a solution to the above ode

    y(x) = -1 + C1*exp(-x)*(x + 2)

    Which is correct.

    But it is not the general solution since in the above
    you only included one of the two basis functions. The "-1" in the
    above is the particular solution. The second basis function
    one is the complicated one.

    -----------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)=0;
    dsolve(ode,output=basis);

    exp(-x)*(x + 2) #first basis function

    #second basis function
    Pi*(x + 2)*erf(I/2*sqrt(2)*(x + 2))*exp(-2 - x) - sqrt(Pi)*sqrt(2)*exp(x*(x + 2)/2)*I
    ----------------

    While the particular solution is

    ------------------
    ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)-x=0;
    DEtools:-particularsol(ode)

    -1
    -----------------

    So your solution is this

    y = particular solution + c1* first basis function

    While Mathematica's solution is

    y = particular solution + c1* first basis function + C2* second basis function.

    This is why your solution is simpler. But it is not the general solution.

    So this is like comparing apples to oranges, which is not fair.

    --Nasser

    I am talking wolframApha, not mathematica. wolfram cannot find SIMPLE solution.

    m,athHand.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)