28.5.12 problem 9.12

Internal problem ID [4599]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 9. Series Solutions of Differential Equations. Problems at page 426
Problem number : 9.12
Date solved : Tuesday, March 04, 2025 at 06:56:16 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.017 (sec). Leaf size: 42
Order:=6; 
ode:=x^2*diff(diff(y(x),x),x)+(-2*x^2+x)*diff(y(x),x)-x*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y \left (x \right ) = \left (c_{2} \ln \left (x \right )+c_{1} \right ) \left (1+x +\frac {3}{4} x^{2}+\frac {5}{12} x^{3}+\frac {35}{192} x^{4}+\frac {21}{320} x^{5}+\operatorname {O}\left (x^{6}\right )\right )+\left (-\frac {1}{4} x^{2}-\frac {1}{4} x^{3}-\frac {19}{128} x^{4}-\frac {25}{384} x^{5}+\operatorname {O}\left (x^{6}\right )\right ) c_{2} \]
Mathematica. Time used: 0.006 (sec). Leaf size: 104
ode=x^2*D[y[x],{x,2}]+(x-2*x^2)*D[y[x],x]-x*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_1 \left (\frac {21 x^5}{320}+\frac {35 x^4}{192}+\frac {5 x^3}{12}+\frac {3 x^2}{4}+x+1\right )+c_2 \left (-\frac {25 x^5}{384}-\frac {19 x^4}{128}-\frac {x^3}{4}-\frac {x^2}{4}+\left (\frac {21 x^5}{320}+\frac {35 x^4}{192}+\frac {5 x^3}{12}+\frac {3 x^2}{4}+x+1\right ) \log (x)\right ) \]
Sympy. Time used: 0.917 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - x*y(x) + (-2*x**2 + x)*Derivative(y(x), 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} \left (\frac {21 x^{5}}{320} + \frac {35 x^{4}}{192} + \frac {5 x^{3}}{12} + \frac {3 x^{2}}{4} + x + 1\right ) + O\left (x^{6}\right ) \]