66.20.3 problem 4

Internal problem ID [16256]
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.4. page 608
Problem number : 4
Date solved : Thursday, October 02, 2025 at 10:44:12 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+2 y&=-2 \delta \left (t -2\right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=2 \\ y^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.288 (sec). Leaf size: 27
ode:=diff(diff(y(t),t),t)+2*diff(y(t),t)+2*y(t) = -2*Dirac(t-2); 
ic:=[y(0) = 2, D(y)(0) = 0]; 
dsolve([ode,op(ic)],y(t),method='laplace');
 
\[ y = 2 \,{\mathrm e}^{-t} \left (-\operatorname {Heaviside}\left (t -2\right ) {\mathrm e}^{2} \sin \left (t -2\right )+\cos \left (t \right )+\sin \left (t \right )\right ) \]
Mathematica. Time used: 0.093 (sec). Leaf size: 110
ode=D[y[t],{t,2}]+2*D[y[t],t]+2*y[t]==-2*DiracDelta[t-2]; 
ic={y[0]==2,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to -e^{-t} \left (\sin (t) \int _1^0-2 e^2 \cos (2) \delta (K[1]-2)dK[1]-\sin (t) \int _1^t-2 e^2 \cos (2) \delta (K[1]-2)dK[1]+\cos (t) \int _1^02 e^2 \delta (K[2]-2) \sin (2)dK[2]-\cos (t) \int _1^t2 e^2 \delta (K[2]-2) \sin (2)dK[2]-2 (\sin (t)+\cos (t))\right ) \end{align*}
Sympy. Time used: 1.507 (sec). Leaf size: 76
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(2*Dirac(t - 2) + 2*y(t) + 2*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 2, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (\left (2 \int \operatorname {Dirac}{\left (t - 2 \right )} e^{t} \sin {\left (t \right )}\, dt - 2 \int \limits ^{0} \operatorname {Dirac}{\left (t - 2 \right )} e^{t} \sin {\left (t \right )}\, dt + 2\right ) \cos {\left (t \right )} + \left (- 2 \int \operatorname {Dirac}{\left (t - 2 \right )} e^{t} \cos {\left (t \right )}\, dt + 2 \int \limits ^{0} \operatorname {Dirac}{\left (t - 2 \right )} e^{t} \cos {\left (t \right )}\, dt + 2\right ) \sin {\left (t \right )}\right ) e^{- t} \]