20.23.6 problem Problem 6

Internal problem ID [3978]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 10, The Laplace Transform and Some Elementary Applications. Exercises for 10.8. page 710
Problem number : Problem 6
Date solved : Sunday, March 30, 2025 at 02:13:33 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

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