73.22.6 problem 31.6 (f)

Internal problem ID [15633]
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 (f)
Date solved : Tuesday, January 28, 2025 at 08:03:24 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method

Solution by Maple

Time used: 10.254 (sec). Leaf size: 22

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

Solution by Mathematica

Time used: 0.111 (sec). Leaf size: 113

DSolve[D[y[t],{t,2}]+2*y[t]==DiracDelta[t]+DiracDelta[t-Pi],y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \cos \left (\sqrt {2} t\right ) \int _1^t-\frac {(\delta (K[1])+\delta (K[1]-\pi )) \sin \left (\sqrt {2} K[1]\right )}{\sqrt {2}}dK[1]+\sin \left (\sqrt {2} t\right ) \int _1^t\frac {\cos \left (\sqrt {2} K[2]\right ) (\delta (K[2])+\delta (K[2]-\pi ))}{\sqrt {2}}dK[2]+c_1 \cos \left (\sqrt {2} t\right )+c_2 \sin \left (\sqrt {2} t\right ) \]