54.3.26 problem 26

Internal problem ID [8582]
Book : Elementary differential equations. Rainville, Bedient, Bedient. Prentice Hall. NJ. 8th edition. 1997.
Section : CHAPTER 17. Power series solutions. 17.5. Solutions Near an Ordinary Point. Exercises page 355
Problem number : 26
Date solved : Wednesday, March 05, 2025 at 06:09:59 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

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