63.17.2 problem 3

Internal problem ID [13122]
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 : 3
Date solved : Wednesday, March 05, 2025 at 09:17:46 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }-x&=\delta \left (t -5\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: 8.812 (sec). Leaf size: 13
ode:=diff(diff(x(t),t),t)-x(t) = Dirac(t-5); 
ic:=x(0) = 0, D(x)(0) = 0; 
dsolve([ode,ic],x(t),method='laplace');
 
\[ x \left (t \right ) = \operatorname {Heaviside}\left (t -5\right ) \sinh \left (t -5\right ) \]
Mathematica. Time used: 0.051 (sec). Leaf size: 104
ode=D[x[t],{t,2}]-x[t]==DiracDelta[t-5]; 
ic={x[0]==0,Derivative[1][x][0 ]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to -e^{-t} \left (e^{2 t} \int _1^0\frac {\delta (K[1]-5)}{2 e^5}dK[1]-e^{2 t} \int _1^t\frac {\delta (K[1]-5)}{2 e^5}dK[1]-\int _1^t-\frac {1}{2} e^5 \delta (K[2]-5)dK[2]+\int _1^0-\frac {1}{2} e^5 \delta (K[2]-5)dK[2]\right ) \]
Sympy. Time used: 0.689 (sec). Leaf size: 56
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-Dirac(t - 5) - 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 (\frac {\int \operatorname {Dirac}{\left (t - 5 \right )} e^{- t}\, dt}{2} - \frac {\int \limits ^{0} \operatorname {Dirac}{\left (t - 5 \right )} e^{- t}\, dt}{2}\right ) e^{t} + \left (- \frac {\int \operatorname {Dirac}{\left (t - 5 \right )} e^{t}\, dt}{2} + \frac {\int \limits ^{0} \operatorname {Dirac}{\left (t - 5 \right )} e^{t}\, dt}{2}\right ) e^{- t} \]