14.19.2 problem 5

Internal problem ID [2695]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.12, Dirac delta function. Excercises page 250
Problem number : 5
Date solved : Monday, January 27, 2025 at 06:09:31 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y&=\sin \left (t \right )+\delta \left (t -\pi \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: 0.897 (sec). Leaf size: 24

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

Solution by Mathematica

Time used: 0.053 (sec). Leaf size: 27

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