58.11.30 problem 30

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

\begin{align*} y^{\prime \prime }+6 y^{\prime }+9 y&=27 \,{\mathrm e}^{-6 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.021 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+6*diff(y(x),x)+9*y(x) = 27*exp(-6*x); 
ic:=[y(0) = -2, D(y)(0) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = 3 \,{\mathrm e}^{-6 x}+{\mathrm e}^{-3 x} \left (3 x -5\right ) \]
Mathematica. Time used: 0.013 (sec). Leaf size: 24
ode=D[y[x],{x,2}]+6*D[y[x],x]+9*y[x]==27*Exp[-6*x]; 
ic={y[0]==-2,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-6 x} \left (e^{3 x} (3 x-5)+3\right ) \end{align*}
Sympy. Time used: 0.163 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) + 6*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 27*exp(-6*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 (3 x - 5 + 3 e^{- 3 x}\right ) e^{- 3 x} \]