84.36.1 problem 21.24

Internal problem ID [22341]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 21. Gamma function. Bessel function. Supplementary problems
Problem number : 21.24
Date solved : Thursday, October 02, 2025 at 08:37:46 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 75
Order:=6; 
ode:=x^2*diff(diff(y(x),x),x)-x*diff(y(x),x)+(-n^2+x^2+1)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = x \left (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 )\right ) \]
Mathematica. Time used: 0.003 (sec). Leaf size: 164
ode=x^2*D[y[x],{x,2}]-x*D[y[x],x]+(1+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+(2-n) (3-n)-2\right ) \left (-n^2+n+(4-n) (5-n)-4\right )}-\frac {x^2}{-n^2+n+(2-n) (3-n)-2}+1\right ) x^{1-n}+c_1 \left (\frac {x^4}{\left (-n^2-n+(n+2) (n+3)-2\right ) \left (-n^2-n+(n+4) (n+5)-4\right )}-\frac {x^2}{-n^2-n+(n+2) (n+3)-2}+1\right ) x^{n+1} \]
Sympy. Time used: 0.305 (sec). Leaf size: 20
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 + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
\[ y{\left (x \right )} = C_{1} x \left (\frac {x^{4}}{64} - \frac {x^{2}}{4} + 1\right ) + O\left (x^{6}\right ) \]