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).
Sorry for the dyslexic title and such an awful text formatting. :(
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:
Related
Bugs: #3036