66.19.7 problem 33

Internal problem ID [16252]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 6. Laplace transform. Section 6.3 page 600
Problem number : 33
Date solved : Thursday, October 02, 2025 at 10:44:08 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+9 y&=20 \operatorname {Heaviside}\left (t -2\right ) \sin \left (t -2\right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=1 \\ y^{\prime }\left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.540 (sec). Leaf size: 67
ode:=diff(diff(y(t),t),t)+4*diff(y(t),t)+9*y(t) = 20*Heaviside(t-2)*sin(t-2); 
ic:=[y(0) = 1, D(y)(0) = 2]; 
dsolve([ode,op(ic)],y(t),method='laplace');
 
\[ y = \cos \left (\sqrt {5}\, \left (t -2\right )\right ) {\mathrm e}^{4-2 t} \operatorname {Heaviside}\left (t -2\right )+\cos \left (\sqrt {5}\, t \right ) {\mathrm e}^{-2 t}+\frac {4 \sqrt {5}\, \sin \left (\sqrt {5}\, t \right ) {\mathrm e}^{-2 t}}{5}-\operatorname {Heaviside}\left (t -2\right ) \left (\cos \left (t -2\right )-2 \sin \left (t -2\right )\right ) \]
Mathematica. Time used: 158.973 (sec). Leaf size: 244
ode=D[y[t],{t,2}]+4*D[y[t],t]+9*y[t]==20*UnitStep[t-2]*Sin[t-2]; 
ic={y[0]==1,Derivative[1][y][0] ==2}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \frac {1}{5} e^{-2 t} \left (-5 \cos \left (\sqrt {5} t\right ) \int _1^04 \sqrt {5} e^{2 K[4]} \sin (2-K[4]) \sin \left (\sqrt {5} K[4]\right ) \theta (K[4]-2)dK[4]+5 \cos \left (\sqrt {5} t\right ) \int _1^t4 \sqrt {5} e^{2 K[4]} \sin (2-K[4]) \sin \left (\sqrt {5} K[4]\right ) \theta (K[4]-2)dK[4]-5 \sin \left (\sqrt {5} t\right ) \int _1^0-4 \sqrt {5} e^{2 K[3]} \cos \left (\sqrt {5} K[3]\right ) \sin (2-K[3]) \theta (K[3]-2)dK[3]+5 \sin \left (\sqrt {5} t\right ) \int _1^t-4 \sqrt {5} e^{2 K[3]} \cos \left (\sqrt {5} K[3]\right ) \sin (2-K[3]) \theta (K[3]-2)dK[3]+4 \sqrt {5} \sin \left (\sqrt {5} t\right )+5 \cos \left (\sqrt {5} t\right )\right ) \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(9*y(t) - 20*sin(t - 2)*Heaviside(t - 2) + 4*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 1, Subs(Derivative(y(t), t), t, 0): 2} 
dsolve(ode,func=y(t),ics=ics)
 
Timed Out