57.17.3 problem 4

Internal problem ID [14483]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 3, Laplace transform. Section 3.4 Impulsive sources. Exercises page 173
Problem number : 4
Date solved : Thursday, October 02, 2025 at 09:37:43 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=0 \\ x^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.108 (sec). Leaf size: 13
ode:=diff(diff(x(t),t),t)+x(t) = Dirac(t-2); 
ic:=[x(0) = 0, D(x)(0) = 0]; 
dsolve([ode,op(ic)],x(t),method='laplace');
 
\[ x = \operatorname {Heaviside}\left (t -2\right ) \sin \left (t -2\right ) \]
Mathematica. Time used: 0.074 (sec). Leaf size: 17
ode=D[x[t],{t,2}]+x[t]==DiracDelta[t-2]; 
ic={x[0]==0,Derivative[1][x][0 ]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -\theta (t-2) \sin (2-t) \end{align*}
Sympy. Time used: 0.422 (sec). Leaf size: 49
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-Dirac(t - 2) + x(t) + Derivative(x(t), (t, 2)),0) 
ics = {x(0): 0, Subs(Derivative(x(t), t), t, 0): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (- \int \operatorname {Dirac}{\left (t - 2 \right )} \sin {\left (t \right )}\, dt + \int \limits ^{0} \operatorname {Dirac}{\left (t - 2 \right )} \sin {\left (t \right )}\, dt\right ) \cos {\left (t \right )} + \left (\int \operatorname {Dirac}{\left (t - 2 \right )} \cos {\left (t \right )}\, dt - \int \limits ^{0} \operatorname {Dirac}{\left (t - 2 \right )} \cos {\left (t \right )}\, dt\right ) \sin {\left (t \right )} \]