46.2.5 problem 6

Internal problem ID [7308]
Book : ADVANCED ENGINEERING MATHEMATICS. ERWIN KREYSZIG, HERBERT KREYSZIG, EDWARD J. NORMINTON. 10th edition. John Wiley USA. 2011
Section : Chapter 5. Series Solutions of ODEs. Special Functions. Problem set 5.3. Extended Power Series Method: Frobenius Method page 186
Problem number : 6
Date solved : Wednesday, March 05, 2025 at 04:23:02 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.007 (sec). Leaf size: 58
Order:=6; 
ode:=x*diff(diff(y(x),x),x)+2*x^3*diff(y(x),x)+(x^2-2)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = c_{1} x \left (1+x +\frac {1}{3} x^{2}-\frac {7}{36} x^{3}-\frac {97}{360} x^{4}-\frac {517}{5400} x^{5}+\operatorname {O}\left (x^{6}\right )\right )+c_{2} \left (\ln \left (x \right ) \left (2 x +2 x^{2}+\frac {2}{3} x^{3}-\frac {7}{18} x^{4}-\frac {97}{180} x^{5}+\operatorname {O}\left (x^{6}\right )\right )+\left (1-3 x^{2}-\frac {31}{18} x^{3}-\frac {85}{216} x^{4}+\frac {4067}{5400} x^{5}+\operatorname {O}\left (x^{6}\right )\right )\right ) \]
Mathematica. Time used: 0.02 (sec). Leaf size: 83
ode=x*D[y[x],{x,2}]+2*x^3*D[y[x],x]+(x^2-2)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_1 \left (\frac {1}{216} \left (-x^4-516 x^3-1080 x^2-432 x+216\right )-\frac {1}{18} x \left (7 x^3-12 x^2-36 x-36\right ) \log (x)\right )+c_2 \left (-\frac {97 x^5}{360}-\frac {7 x^4}{36}+\frac {x^3}{3}+x^2+x\right ) \]
Sympy. Time used: 1.092 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x**3*Derivative(y(x), x) + x*Derivative(y(x), (x, 2)) + (x**2 - 2)*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 {97 x^{4}}{360} - \frac {7 x^{3}}{36} + \frac {x^{2}}{3} + x + 1\right ) + O\left (x^{6}\right ) \]