46.1.30 problem 26 (b)

Internal problem ID [9533]
Book : DIFFERENTIAL EQUATIONS with Boundary Value Problems. DENNIS G. ZILL, WARREN S. WRIGHT, MICHAEL R. CULLEN. Brooks/Cole. Boston, MA. 2013. 8th edition.
Section : CHAPTER 6 SERIES SOLUTIONS OF LINEAR EQUATIONS. Section 6.2 SOLUTIONS ABOUT ORDINARY POINTS. EXERCISES 6.2. Page 246
Problem number : 26 (b)
Date solved : Tuesday, September 30, 2025 at 06:20:16 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 x y^{\prime }-4 y&={\mathrm e}^{x} \end{align*}

Using series method with expansion around

\begin{align*} 0 \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 79
Order:=8; 
ode:=diff(diff(y(x),x),x)-4*x*diff(y(x),x)-4*y(x) = exp(x); 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (1+2 x^{2}+2 x^{4}+\frac {4}{3} x^{6}\right ) y \left (0\right )+\left (x +\frac {4}{3} x^{3}+\frac {16}{15} x^{5}+\frac {64}{105} x^{7}\right ) y^{\prime }\left (0\right )+\frac {x^{2}}{2}+\frac {x^{3}}{6}+\frac {13 x^{4}}{24}+\frac {17 x^{5}}{120}+\frac {29 x^{6}}{80}+\frac {409 x^{7}}{5040}+O\left (x^{8}\right ) \]
Mathematica. Time used: 0.008 (sec). Leaf size: 94
ode=D[y[x],{x,2}]-4*x*D[y[x],x]-4*y[x]==Exp[x]; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,7}]
 
\[ y(x)\to \frac {409 x^7}{5040}+\frac {29 x^6}{80}+\frac {17 x^5}{120}+\frac {13 x^4}{24}+\frac {x^3}{6}+\frac {x^2}{2}+c_2 \left (\frac {64 x^7}{105}+\frac {16 x^5}{15}+\frac {4 x^3}{3}+x\right )+c_1 \left (\frac {4 x^6}{3}+2 x^4+2 x^2+1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x*Derivative(y(x), x) - 4*y(x) - exp(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=8)
 
ValueError : ODE -4*x*Derivative(y(x), x) - 4*y(x) - exp(x) + Derivative(y(x), (x, 2)) does not match hint 2nd_power_series_regular