72.16.5 problem 5

Internal problem ID [14822]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 4. Forcing and Resonance. Section 4.1 page 399
Problem number : 5
Date solved : Thursday, March 13, 2025 at 04:20:15 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.005 (sec). Leaf size: 26
ode:=diff(diff(y(t),t),t)+4*diff(y(t),t)+13*y(t) = -3*exp(-2*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {{\mathrm e}^{-2 t} \left (3 \sin \left (3 t \right ) c_{2} +3 \cos \left (3 t \right ) c_{1} -1\right )}{3} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 32
ode=D[y[t],{t,2}]+4*D[y[t],t]+13*y[t]==-3*Exp[-2*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{3} e^{-2 t} (3 c_2 \cos (3 t)+3 c_1 \sin (3 t)-1) \]
Sympy. Time used: 0.258 (sec). Leaf size: 24
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(13*y(t) + 4*Derivative(y(t), t) + Derivative(y(t), (t, 2)) + 3*exp(-2*t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (C_{1} \sin {\left (3 t \right )} + C_{2} \cos {\left (3 t \right )} - \frac {1}{3}\right ) e^{- 2 t} \]