54.9.23 problem 24

Internal problem ID [8693]
Book : Elementary differential equations. Rainville, Bedient, Bedient. Prentice Hall. NJ. 8th edition. 1997.
Section : CHAPTER 18. Power series solutions. Miscellaneous Exercises. page 394
Problem number : 24
Date solved : Sunday, March 30, 2025 at 01:23:44 PM
CAS classification : [[_Bessel, _modified]]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}

Maple. Time used: 0.032 (sec). Leaf size: 50
Order:=8; 
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)-(x^2+4)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \frac {c_1 \,x^{4} \left (1+\frac {1}{12} x^{2}+\frac {1}{384} x^{4}+\frac {1}{23040} x^{6}+\operatorname {O}\left (x^{8}\right )\right )+c_2 \left (\ln \left (x \right ) \left (9 x^{4}+\frac {3}{4} x^{6}+\operatorname {O}\left (x^{8}\right )\right )+\left (-144+36 x^{2}-\frac {1}{2} x^{6}+\operatorname {O}\left (x^{8}\right )\right )\right )}{x^{2}} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 74
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]-(x^2+4)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,7}]
 
\[ y(x)\to c_1 \left (\frac {11 x^6+36 x^4-576 x^2+2304}{2304 x^2}-\frac {1}{192} x^2 \left (x^2+12\right ) \log (x)\right )+c_2 \left (\frac {x^8}{23040}+\frac {x^6}{384}+\frac {x^4}{12}+x^2\right ) \]
Sympy. Time used: 0.786 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) - (x**2 + 4)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=8)
 
\[ y{\left (x \right )} = C_{1} x^{2} \left (\frac {x^{4}}{384} + \frac {x^{2}}{12} + 1\right ) + O\left (x^{8}\right ) \]