54.6.6 problem 6

Internal problem ID [8638]
Book : Elementary differential equations. Rainville, Bedient, Bedient. Prentice Hall. NJ. 8th edition. 1997.
Section : CHAPTER 18. Power series solutions. 18.8 Indicial Equation with Difference of Roots a Positive Integer: Nonlogarithmic Case. Exercises page 380
Problem number : 6
Date solved : Wednesday, March 05, 2025 at 06:11:12 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.020 (sec). Leaf size: 50
Order:=8; 
ode:=x*(1+x)*diff(diff(y(x),x),x)+(x+5)*diff(y(x),x)-4*y(x) = 0; 
dsolve(ode,y(x),type='series',x=-1);
 
\[ y = c_{1} \left (x +1\right )^{5} \left (1+\frac {7}{2} \left (x +1\right )+8 \left (x +1\right )^{2}+15 \left (x +1\right )^{3}+25 \left (x +1\right )^{4}+\frac {77}{2} \left (x +1\right )^{5}+56 \left (x +1\right )^{6}+78 \left (x +1\right )^{7}+\operatorname {O}\left (\left (x +1\right )^{8}\right )\right )+c_{2} \left (2880+2880 \left (x +1\right )+1440 \left (x +1\right )^{2}+2880 \left (x +1\right )^{5}+10080 \left (x +1\right )^{6}+23040 \left (x +1\right )^{7}+\operatorname {O}\left (\left (x +1\right )^{8}\right )\right ) \]
Mathematica. Time used: 0.121 (sec). Leaf size: 88
ode=x*(1+x)*D[y[x],{x,2}]+(x+5)*D[y[x],x]-4*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,-1,7}]
 
\[ y(x)\to c_1 \left (\frac {7}{2} (x+1)^6+(x+1)^5+\frac {1}{2} (x+1)^2+x+2\right )+c_2 \left (56 (x+1)^{11}+\frac {77}{2} (x+1)^{10}+25 (x+1)^9+15 (x+1)^8+8 (x+1)^7+\frac {7}{2} (x+1)^6+(x+1)^5\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x + 1)*Derivative(y(x), (x, 2)) + (x + 5)*Derivative(y(x), x) - 4*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=-1,n=8)
 
IndexError : tuple index out of range