22.3.9 problem 6.44

Internal problem ID [4522]
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.44
Date solved : Tuesday, September 30, 2025 at 07:33:50 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y^{\prime }-2 y&=9 \,{\mathrm e}^{2 t} \operatorname {Heaviside}\left (t -1\right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=6 \\ y^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.159 (sec). Leaf size: 42
ode:=diff(diff(y(t),t),t)-diff(y(t),t)-2*y(t) = 9*exp(2*t)*Heaviside(t-1); 
ic:=[y(0) = 6, D(y)(0) = 0]; 
dsolve([ode,op(ic)],y(t),method='laplace');
 
\[ y = {\mathrm e}^{3-t} \operatorname {Heaviside}\left (t -1\right )+{\mathrm e}^{2 t} \left (3 t -4\right ) \operatorname {Heaviside}\left (t -1\right )+4 \,{\mathrm e}^{-t}+2 \,{\mathrm e}^{2 t} \]
Mathematica. Time used: 0.023 (sec). Leaf size: 47
ode=D[y[t],{t,2}]-D[y[t],t]-2*y[t]==9*Exp[2*t]*UnitStep[t-1]; 
ic={y[0]==6,Derivative[1][y][0] == 0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \begin {array}{cc} \{ & \begin {array}{cc} 2 e^{-t} \left (2+e^{3 t}\right ) & t\leq 1 \\ e^{-t} \left (e^{3 t} (3 t-2)+e^3+4\right ) & \text {True} \\ \end {array} \\ \end {array} \end{align*}
Sympy. Time used: 0.366 (sec). Leaf size: 42
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*y(t) - 9*exp(2*t)*Heaviside(t - 1) - Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 6, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (e^{3} \theta \left (t - 1\right ) + 4\right ) e^{- t} + \left (3 \left (\begin {cases} 0 & \text {for}\: \left |{t}\right | < 1 \\t {G_{2, 2}^{0, 2}\left (\begin {matrix} 0, 1 & \\ & -1, 0 \end {matrix} \middle | {t} \right )} & \text {otherwise} \end {cases}\right ) - \theta \left (t - 1\right ) + 2\right ) e^{2 t} \]