12.13.24 problem 27

Internal problem ID [1915]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 7 Series Solutions of Linear Second Equations. 7.3 SERIES SOLUTIONS NEAR AN ORDINARY POINT II. Exercises 7.3. Page 338
Problem number : 27
Date solved : Tuesday, March 04, 2025 at 01:46:08 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

With initial conditions

\begin{align*} y \left (-4\right )&=1\\ y^{\prime }\left (-4\right )&=2 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 20
Order:=6; 
ode:=(7+x)*diff(diff(y(x),x),x)+(8+2*x)*diff(y(x),x)+(5+x)*y(x) = 0; 
ic:=y(-4) = 1, D(y)(-4) = 2; 
dsolve([ode,ic],y(x),type='series',x=-4);
 
\[ y = 1+2 \left (x +4\right )-\frac {1}{6} \left (x +4\right )^{2}-\frac {10}{27} \left (x +4\right )^{3}+\frac {19}{648} \left (x +4\right )^{4}+\frac {13}{324} \left (x +4\right )^{5}+\operatorname {O}\left (\left (x +4\right )^{6}\right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 46
ode=(7+x)*D[y[x],{x,2}]+(8+2*x)*D[y[x],x]+(5+x)*y[x]==0; 
ic={y[-4]==1,Derivative[1][y][-4 ]==2}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,-4,5}]
 
\[ y(x)\to \frac {13}{324} (x+4)^5+\frac {19}{648} (x+4)^4-\frac {10}{27} (x+4)^3-\frac {1}{6} (x+4)^2+2 (x+4)+1 \]
Sympy. Time used: 0.860 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 5)*y(x) + (x + 7)*Derivative(y(x), (x, 2)) + (2*x + 8)*Derivative(y(x), x),0) 
ics = {y(-4): 1, Subs(Derivative(y(x), x), x, -4): 2} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_ordinary",x0=-4,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (\frac {19 \left (x + 4\right )^{4}}{648} - \frac {\left (x + 4\right )^{3}}{27} - \frac {\left (x + 4\right )^{2}}{6} + 1\right ) + C_{1} \left (x - \frac {\left (x + 4\right )^{3}}{6} + 4\right ) + O\left (x^{6}\right ) \]