58.11.31 problem 31

Internal problem ID [14762]
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 : 31
Date solved : Thursday, October 02, 2025 at 09:50:54 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+13 y&=18 \,{\mathrm e}^{-2 x} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ y^{\prime }\left (0\right )&=4 \\ \end{align*}
Maple. Time used: 0.046 (sec). Leaf size: 24
ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)+13*y(x) = 18*exp(-2*x); 
ic:=[y(0) = 0, D(y)(0) = 4]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {2 \,{\mathrm e}^{-2 x} \left (2 \sin \left (3 x \right )-3 \cos \left (3 x \right )+3\right )}{3} \]
Mathematica. Time used: 0.014 (sec). Leaf size: 28
ode=D[y[x],{x,2}]+4*D[y[x],x]+13*y[x]==18*Exp[-2*x]; 
ic={y[0]==0,Derivative[1][y][0] ==4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} e^{-2 x} (4 \sin (3 x)-6 \cos (3 x)+6) \end{align*}
Sympy. Time used: 0.169 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(13*y(x) + 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 18*exp(-2*x),0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\frac {4 \sin {\left (3 x \right )}}{3} - 2 \cos {\left (3 x \right )} + 2\right ) e^{- 2 x} \]