Menu

#3036 Incorrect solution of ODEs "inf"

None
open
5
2016-09-24
2015-10-20
sslavi
No

Maxima seem to consider "inf" as a constant and hence doesn't solve correctly initial value problems involving "inf". The problem is present in both ic1 and ic2 functions. Please take a look at the attached example.

For your convenience, this is the transcript of the session:

Input:
*> f1: 'diff(y,x)=1/x^2$

ode2(f1,y,x);
ic1(%,x=inf,y=0);
Output:
> (%o2) y=%c-1/x
(%o3) y=(x-inf)/(infx)*
the correct answer is 1/(2x).

Input:
*> f2: 'diff(y,x,2)=1/x^3$

ode2(f2,y,x);
ic2(%,x=inf,y=0,diff(y,x)=0);
Output:
>(%o5) y=%k2x+1/(2x)+%k1
(%o6) y=x/(2inf^2)+1/(2x)-1/inf*
the correct answer is 1/(2x).

1 Attachments

Related

Bugs: #3036

Discussion

  • sslavi

    sslavi - 2015-10-20

    Sorry for the dyslexic title and such an awful text formatting. :(

     
  • David Billinghurst

    • assigned_to: David Billinghurst
     
    • Aleksas

      Aleksas - 2016-09-24

      Solve y' = 1/x^2, y(inf)=0.

      Solve y'' = 1/x^3, y(inf)=0, y'(inf)=0.

      (%i2) eq1:'diff(y,x)=1/x^2$
      eq2:'diff(y,x,2)=1/x^3$

      (%i5) ode2(eq1,y,x);
      ic1(%,x=a,y=0);
      limit(%,a,inf);
      (%o3) y=%c-1/x
      (%o4) y=(x-a)/(a*x)
      (%o5) y=-1/x

      (%i8) ode2(eq2,y,x);
      ic2(%,x=a,y=0,diff(y,x)=0);
      limit(%,a,inf);
      (%o6) y=%k2x+1/(2x)+%k1
      (%o7) y=x/(2a^2)+1/(2x)-1/a
      (%o8) y=1/(2*x)

      Other solution with odes:
      (%i9) load(odes)$

      (%i11) ode1_ic(eq1,y,x,[a,0]);
      limit(%,a,inf);
      (%o10) y=(x-a)/(a*x)
      (%o11) y=-1/x

      (%i13) ode2_ic(eq2,y,x,[a,0,0]);
      limit(%,a,inf);
      (%o12) y=x/(2a^2)+1/(2x)-1/a
      (%o13) y=1/(2*x)

      best

      Aleksas D

      2016-09-24 5:44 GMT+03:00 David Billinghurst billingd@users.sf.net:

      • assigned_to: David Billinghurst

      Status: open
      Group: None
      Labels: ic1 ic2 inf
      Created: Tue Oct 20, 2015 05:13 PM UTC by sslavi
      Last Updated: Tue Oct 20, 2015 05:21 PM UTC
      Owner: David Billinghurst
      Attachments:

      Maxima seem to consider "inf" as a constant and hence doesn't solve
      correctly initial value problems involving "inf". The problem is present in
      both ic1 and ic2 functions. Please take a look at the attached example.

      For your convenience, this is the transcript of the session:

      Input:
      *> f1: 'diff(y,x)=1/x^2$

      ode2(f1,y,x);
      ic1(%,x=inf,y=0);
      Output:> (%o2) y=%c-1/x
      (%o3) y=(x-inf)/(infx)*
      the correct answer is 1/(2x).

      Input:
      *> f2: 'diff(y,x,2)=1/x^3$

      ode2(f2,y,x);
      ic2(%,x=inf,y=0,diff(y,x)=0);
      Output:>(%o5) y=%k2x+1/(2x)+%k1
      (%o6) y=x/(2inf^2)+1/(2x)-1/inf*
      the correct answer is 1/(2x).


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/maxima/bugs/3036/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #3036


Log in to post a comment.