89.16.30 problem 30

Internal problem ID [24680]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 9. Nonhomogeneous Equations: Undetermined coefficients. Exercises at page 140
Problem number : 30
Date solved : Thursday, October 02, 2025 at 10:47:00 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} 5 y+4 y^{\prime }+y^{\prime \prime }&=10 \,{\mathrm e}^{-3 x} \end{align*}

With initial conditions

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