87.26.12 problem 20

Internal problem ID [23846]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 5. Series solutions of second order linear equations. Exercise at page 253
Problem number : 20
Date solved : Thursday, October 02, 2025 at 09:45:47 PM
CAS classification : [_Bessel]

\begin{align*} x^{2} y^{\prime \prime }+x y^{\prime }+\left (-p^{2}+x^{2}\right ) y&=0 \end{align*}

Using series method with expansion around

\begin{align*} 0 \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 73
Order:=6; 
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+(-p^2+x^2)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = c_1 \,x^{-p} \left (1+\frac {1}{4 p -4} x^{2}+\frac {1}{32} \frac {1}{\left (p -2\right ) \left (p -1\right )} x^{4}+\operatorname {O}\left (x^{6}\right )\right )+c_2 \,x^{p} \left (1-\frac {1}{4 p +4} x^{2}+\frac {1}{32} \frac {1}{\left (p +2\right ) \left (p +1\right )} x^{4}+\operatorname {O}\left (x^{6}\right )\right ) \]
Mathematica. Time used: 0.002 (sec). Leaf size: 160
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]+(x^2-p^2)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_2 \left (\frac {x^4}{\left (-p^2-p+(1-p) (2-p)+2\right ) \left (-p^2-p+(3-p) (4-p)+4\right )}-\frac {x^2}{-p^2-p+(1-p) (2-p)+2}+1\right ) x^{-p}+c_1 \left (\frac {x^4}{\left (-p^2+p+(p+1) (p+2)+2\right ) \left (-p^2+p+(p+3) (p+4)+4\right )}-\frac {x^2}{-p^2+p+(p+1) (p+2)+2}+1\right ) x^p \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) + (-p**2 + x**2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
ValueError : Expected Expr or iterable but got None