73.25.30 problem 35.5 (b)

Internal problem ID [15667]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 35. Modified Power series solutions and basic method of Frobenius. Additional Exercises. page 715
Problem number : 35.5 (b)
Date solved : Monday, March 31, 2025 at 01:44:30 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+\frac {2 y^{\prime }}{x +2}+y&=0 \end{align*}

Using series method with expansion around

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

Maple. Time used: 0.021 (sec). Leaf size: 34
Order:=6; 
ode:=diff(diff(y(x),x),x)+2/(x+2)*diff(y(x),x)+y(x) = 0; 
dsolve(ode,y(x),type='series',x=-2);
 
\[ y = c_1 \left (1-\frac {1}{6} \left (x +2\right )^{2}+\frac {1}{120} \left (x +2\right )^{4}+\operatorname {O}\left (\left (x +2\right )^{6}\right )\right )+\frac {c_2 \left (1-\frac {1}{2} \left (x +2\right )^{2}+\frac {1}{24} \left (x +2\right )^{4}+\operatorname {O}\left (\left (x +2\right )^{6}\right )\right )}{x +2} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 54
ode=D[y[x],{x,2}]+2/(x+2)*D[y[x],x]+y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,-2,5}]
 
\[ y(x)\to c_1 \left (\frac {1}{24} (x+2)^3+\frac {1}{2} (-x-2)+\frac {1}{x+2}\right )+c_2 \left (\frac {1}{120} (x+2)^4-\frac {1}{6} (x+2)^2+1\right ) \]
Sympy. Time used: 0.885 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + Derivative(y(x), (x, 2)) + 2*Derivative(y(x), x)/(x + 2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=-2,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (\frac {\left (x + 2\right )^{4}}{120} - \frac {\left (x + 2\right )^{2}}{6} + 1\right ) + \frac {C_{1} \left (- \frac {\left (x + 2\right )^{6}}{720} + \frac {\left (x + 2\right )^{4}}{24} - \frac {\left (x + 2\right )^{2}}{2} + 1\right )}{x + 2} + O\left (x^{6}\right ) \]