64.11.29 problem 29

Internal problem ID [13400]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 29
Date solved : Wednesday, March 05, 2025 at 09:52:05 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+8 y^{\prime }+16 y&=8 \,{\mathrm e}^{-2 x} \end{align*}

With initial conditions

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

Maple. Time used: 0.015 (sec). Leaf size: 18
ode:=diff(diff(y(x),x),x)+8*diff(y(x),x)+16*y(x) = 8*exp(-2*x); 
ic:=y(0) = 2, D(y)(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 4 \,{\mathrm e}^{-4 x} x +2 \,{\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.022 (sec). Leaf size: 21
ode=D[y[x],{x,2}]+8*D[y[x],x]+16*y[x]==8*Exp[-2*x]; 
ic={y[0]==2,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 e^{-4 x} \left (2 x+e^{2 x}\right ) \]
Sympy. Time used: 0.256 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(16*y(x) + 8*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 8*exp(-2*x),0) 
ics = {y(0): 2, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (4 x e^{- 2 x} + 2\right ) e^{- 2 x} \]