I was trying to verify my solution to this ode using power series method. The expansion point is x=0
. This ode has removable singularity, so Frobenius series and not standard power series has to be used.
Mathematica gives the correct series when no IC are given. But when IC are given (which must be at a point other that x=0
since x=0
is singularity, then the series solution does not look correct, since it does not satisfy initial conditions. I used 8 terms in the following, which is more than enough to show the problem.
First, the solution with no IC
Clear["Global`*"]
ode = x^2*(-x^2 + 2)*y''[x] - x*(4*x^2 + 3)*y'[x] + (-2*x^2 + 2)*y[x] == 0;
sol = AsymptoticDSolveValue[ode, y[x], {x, 0, 8}]
The above is correct, it matches exactly my hand solution. Next, added IC
Clear["Global`*"]
ode = x^2*(-x^2 + 2)*y''[x] - x*(4*x^2 + 3)*y'[x] + (-2*x^2 + 2)*y[x] == 0;
ic = {y[1] == 1, y'[1] == 0}
sol = AsymptoticDSolveValue[{ode, ic}, y[x], {x, 0, 8}]
Now it gives
This looks too complicated. I do not know where all these Gamma functions came from, as the series solution without IC is just a power series. So one would expect the solution with IC to be also a power series.
But lets check if it agrees with IC.
N[sol /. x -> 1]
No where close to 1
. Same for derivative
N[D[sol, x] /. x -> 1]
No where close to 0
.
Then I asked Maple for the series solution using same number of terms and for same IC. Maple's solution does satisfy the IC.
ode:=x^2*(-x^2+2)*diff(diff(y(x),x),x)-x*(4*x^2+3)*diff(y(x),x)+(-2*x^2+2)*y(x) = 0;
ic:=y(1)=1,D(y)(1)=0;
Order:=8;
dsolve([ode,ic],y(x),series,point=0);
Copied the above over to Mathematica and did
mapleSol = 1 + 2/3*(x - 1)^3 + 4/3*(x - 1)^4 + 25/6*(x - 1)^5 + 133/12*(x - 1)^6 + 629/21*(x - 1)^7;
Now
mapleSol /. x -> 1
And
D[mapleSol, x] /. x -> 1
For an ordinary expansion point, (i.e. using normal power series), AsymptoticDSolveValue
had no problem generating correct series with or without IC.
Am I doing something wrong in the above? Why the series generated does not seem to match the IC given?
V 12.3.1 on windows 10