7.21.2 problem 2

Internal problem ID [565]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 4. Laplace transform methods. Section 4.6 (Impulses and Delta functions). Problems at page 324
Problem number : 2
Date solved : Monday, January 27, 2025 at 02:54:55 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 0.329 (sec). Leaf size: 18

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

Solution by Mathematica

Time used: 0.042 (sec). Leaf size: 26

DSolve[{D[x[t],{t,2}]+4*x[t]==DiracDelta[t]+DiracDelta[t-Pi],{x[0]==0,Derivative[1][x][0] ==0}},x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to (-\theta (t)-\theta (t-\pi )+\theta (0)) \sin (t) (-\cos (t)) \]