72.16.35 problem 37

Internal problem ID [14852]
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 : 37
Date solved : Thursday, March 13, 2025 at 05:13:22 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+5 y^{\prime }+6 y&=4+{\mathrm e}^{-t} \end{align*}

With initial conditions

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

Maple. Time used: 0.016 (sec). Leaf size: 24
ode:=diff(diff(y(t),t),t)+5*diff(y(t),t)+6*y(t) = 4+exp(-t); 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {11 \,{\mathrm e}^{-3 t}}{6}-3 \,{\mathrm e}^{-2 t}+\frac {{\mathrm e}^{-t}}{2}+\frac {2}{3} \]
Mathematica. Time used: 0.184 (sec). Leaf size: 28
ode=D[y[t],{t,2}]+5*D[y[t],t]+6*y[t]==4+Exp[-t]; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{6} e^{-3 t} \left (e^t-1\right )^2 \left (4 e^t+11\right ) \]
Sympy. Time used: 0.251 (sec). Leaf size: 27
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(6*y(t) + 5*Derivative(y(t), t) + Derivative(y(t), (t, 2)) - 4 - exp(-t),0) 
ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {2}{3} + \frac {e^{- t}}{2} - 3 e^{- 2 t} + \frac {11 e^{- 3 t}}{6} \]