72.16.13 problem 13

Internal problem ID [14830]
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 : 13
Date solved : Thursday, March 13, 2025 at 04:20:39 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

With initial conditions

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

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