40.2.4 problem 5

Internal problem ID [8593]
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 : 5
Date solved : Tuesday, September 30, 2025 at 05:39:31 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}
Maple. Time used: 0.025 (sec). Leaf size: 41
Order:=6; 
ode:=x*diff(diff(y(x),x),x)+(2*x+1)*diff(y(x),x)+(1+x)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (1-x +\frac {1}{2} x^{2}-\frac {1}{6} x^{3}+\frac {1}{24} x^{4}-\frac {1}{120} x^{5}\right ) \left (\ln \left (x \right ) c_2 +c_1 \right )+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.004 (sec). Leaf size: 78
ode=x*D[y[x],{x,2}]+(2*x+1)*D[y[x],x]+(x+1)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_1 \left (-\frac {x^5}{120}+\frac {x^4}{24}-\frac {x^3}{6}+\frac {x^2}{2}-x+1\right )+c_2 \left (-\frac {x^5}{120}+\frac {x^4}{24}-\frac {x^3}{6}+\frac {x^2}{2}-x+1\right ) \log (x) \]
Sympy. Time used: 0.238 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + (x + 1)*y(x) + (2*x + 1)*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 {x^{5}}{120} + \frac {x^{4}}{24} - \frac {x^{3}}{6} + \frac {x^{2}}{2} - x + 1\right ) + O\left (x^{6}\right ) \]