73.23.21 problem 33.5 (i)

Internal problem ID [15588]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 33. Power series solutions I: Basic computational methods. Additional Exercises. page 641
Problem number : 33.5 (i)
Date solved : Thursday, March 13, 2025 at 06:12:02 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} -2 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 48
Order:=6; 
ode:=diff(diff(y(x),x),x)+(x+2)*diff(y(x),x)+2*y(x) = 0; 
dsolve(ode,y(x),type='series',x=-2);
 
\[ y = \left (1-\left (x +2\right )^{2}+\frac {\left (x +2\right )^{4}}{3}\right ) y \left (-2\right )+\left (x +2-\frac {\left (x +2\right )^{3}}{2}+\frac {\left (x +2\right )^{5}}{8}\right ) y^{\prime }\left (-2\right )+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 49
ode=D[y[x],{x,2}]+(x+2)*D[y[x],x]+2*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,-2,5}]
 
\[ y(x)\to c_1 \left (\frac {1}{3} (x+2)^4-(x+2)^2+1\right )+c_2 \left (\frac {1}{8} (x+2)^5-\frac {1}{2} (x+2)^3+x+2\right ) \]
Sympy. Time used: 0.748 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 2)*Derivative(y(x), x) + 2*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_ordinary",x0=-2,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (\frac {\left (x + 2\right )^{4}}{3} - \left (x + 2\right )^{2} + 1\right ) + C_{1} \left (x - \frac {\left (x + 2\right )^{3}}{2} + 2\right ) + O\left (x^{6}\right ) \]