22.7 problem 31.6 (g)

Internal problem ID [13578]

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).
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+y=-2 \delta \left (t -\frac {\pi }{2}\right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 0, y^{\prime }\left (0\right ) = 0] \end {align*}

Solution by Maple

Time used: 0.079 (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 \left (t \right ) = 2 \operatorname {Heaviside}\left (t -\frac {\pi }{2}\right ) \cos \left (t \right ) \]

Solution by Mathematica

Time used: 0.025 (sec). Leaf size: 17

DSolve[{y''[t]+y[t]==-2*DiracDelta[t-Pi/2],{y[0]==0,y'[0]==0}},y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to 2 \theta (2 t-\pi ) \cos (t) \]