76.21.4 problem 4

Internal problem ID [17689]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 5. The Laplace transform. Section 5.7 (Impulse Functions). Problems at page 350
Problem number : 4
Date solved : Thursday, March 13, 2025 at 10:47:12 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Maple. Time used: 12.491 (sec). Leaf size: 23
ode:=diff(diff(y(t),t),t)-y(t) = -20*Dirac(t-3); 
ic:=y(0) = 4, D(y)(0) = 3; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = -20 \operatorname {Heaviside}\left (t -3\right ) \sinh \left (t -3\right )+4 \cosh \left (t \right )+3 \sinh \left (t \right ) \]
Mathematica. Time used: 0.034 (sec). Leaf size: 47
ode=D[y[t],{t,2}]-y[t]==-20*DiracDelta[t-3]; 
ic={y[0]==4,Derivative[1][y][0] ==3}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{2} e^{-t-3} \left (e^3 \left (7 e^{2 t}+1\right )-20 \left (e^{2 t}-e^6\right ) \theta (t-3)\right ) \]
Sympy. Time used: 0.708 (sec). Leaf size: 63
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(20*Dirac(t - 3) - y(t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 4, Subs(Derivative(y(t), t), t, 0): 3} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (- 10 \int \operatorname {Dirac}{\left (t - 3 \right )} e^{- t}\, dt + 10 \int \limits ^{0} \operatorname {Dirac}{\left (t - 3 \right )} e^{- t}\, dt + \frac {7}{2}\right ) e^{t} + \left (10 \int \operatorname {Dirac}{\left (t - 3 \right )} e^{t}\, dt - 10 \int \limits ^{0} \operatorname {Dirac}{\left (t - 3 \right )} e^{t}\, dt + \frac {1}{2}\right ) e^{- t} \]