73.22.7 problem 31.6 (g)

Internal problem ID [15634]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 31. Delta Functions. Additional Exercises. page 572
Problem number : 31.6 (g)
Date solved : Tuesday, January 28, 2025 at 08:03:25 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 9.604 (sec). Leaf size: 14

dsolve([diff(y(t),t$2)+y(t)=-2*Dirac(t-Pi/2),y(0) = 0, D(y)(0) = 0],y(t), singsol=all)
 
\[ y = 2 \cos \left (t \right ) \operatorname {Heaviside}\left (t -\frac {\pi }{2}\right ) \]

Solution by Mathematica

Time used: 0.028 (sec). Leaf size: 45

DSolve[{D[y[t],{t,2}]+y[t]==-2*DiracDelta[t-Pi/2],{y[0]==0,Derivative[1][y][0] ==0}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \cos (t) \int _1^t4 \delta (\pi -2 K[1])dK[1]-\cos (t) \int _1^04 \delta (\pi -2 K[1])dK[1] \]