22.3.14 problem 6.49

Internal problem ID [4527]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 6. The Laplace Transform and Its Applications. Problems at page 291
Problem number : 6.49
Date solved : Tuesday, September 30, 2025 at 07:33:54 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=-1 \\ y^{\prime }\left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.130 (sec). Leaf size: 40
ode:=diff(diff(y(t),t),t)-5*diff(y(t),t)+6*y(t) = Dirac(t-2); 
ic:=[y(0) = -1, D(y)(0) = 1]; 
dsolve([ode,op(ic)],y(t),method='laplace');
 
\[ y = {\mathrm e}^{3 t -6} \operatorname {Heaviside}\left (t -2\right )-{\mathrm e}^{-4+2 t} \operatorname {Heaviside}\left (t -2\right )+3 \,{\mathrm e}^{3 t}-4 \,{\mathrm e}^{2 t} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 39
ode=D[y[t],{t,2}]-5*D[y[t],t]+6*y[t]==DiracDelta[t-2]; 
ic={y[0]==-1,Derivative[1][y][0] == 1}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to e^{2 t-6} \left (\left (e^t-e^2\right ) \theta (t-2)+e^6 \left (3 e^t-4\right )\right ) \end{align*}
Sympy. Time used: 0.554 (sec). Leaf size: 61
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-Dirac(t - 2) + 6*y(t) - 5*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): -1, Subs(Derivative(y(t), t), t, 0): 1} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (\left (\int \operatorname {Dirac}{\left (t - 2 \right )} e^{- 3 t}\, dt - \int \limits ^{0} \operatorname {Dirac}{\left (t - 2 \right )} e^{- 3 t}\, dt + 3\right ) e^{t} - \int \operatorname {Dirac}{\left (t - 2 \right )} e^{- 2 t}\, dt + \int \limits ^{0} \operatorname {Dirac}{\left (t - 2 \right )} e^{- 2 t}\, dt - 4\right ) e^{2 t} \]