83.14.9 problem 3

Internal problem ID [22024]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter X. Solution in power series. Ex. XVIII at page 174
Problem number : 3
Date solved : Thursday, October 02, 2025 at 08:21:46 PM
CAS classification : [_Bessel]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}
Maple. Time used: 0.012 (sec). Leaf size: 73
Order:=6; 
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+(-n^2+x^2)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = c_1 \,x^{-n} \left (1+\frac {1}{4 n -4} x^{2}+\frac {1}{32} \frac {1}{\left (n -2\right ) \left (n -1\right )} x^{4}+\operatorname {O}\left (x^{6}\right )\right )+c_2 \,x^{n} \left (1-\frac {1}{4 n +4} x^{2}+\frac {1}{32} \frac {1}{\left (n +2\right ) \left (n +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-n^2)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_2 \left (\frac {x^4}{\left (-n^2-n+(1-n) (2-n)+2\right ) \left (-n^2-n+(3-n) (4-n)+4\right )}-\frac {x^2}{-n^2-n+(1-n) (2-n)+2}+1\right ) x^{-n}+c_1 \left (\frac {x^4}{\left (-n^2+n+(n+1) (n+2)+2\right ) \left (-n^2+n+(n+3) (n+4)+4\right )}-\frac {x^2}{-n^2+n+(n+1) (n+2)+2}+1\right ) x^n \]
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) + (-n**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