78.26.4 problem 5 (a)

Internal problem ID [18386]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 9. Laplace transforms. Section 53. More about Convolutions. The Unit Step and Impulse Functions. Problems at page 481
Problem number : 5 (a)
Date solved : Thursday, March 13, 2025 at 11:55:23 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y^{\prime }+2 y&=f \left (t \right ) \end{align*}

Using Laplace method With initial conditions

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

Maple. Time used: 0.307 (sec). Leaf size: 39
ode:=diff(diff(y(t),t),t)+3*diff(y(t),t)+2*y(t) = f(t); 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = -\int _{0}^{t}{\mathrm e}^{-2 t +2 \textit {\_U1}} f \left (\textit {\_U1} \right )d \textit {\_U1} +\int _{0}^{t}{\mathrm e}^{-t +\textit {\_U1}} f \left (\textit {\_U1} \right )d \textit {\_U1} \]
Mathematica. Time used: 0.048 (sec). Leaf size: 87
ode=D[y[t],{t,2}]+3*D[y[t],t]+2*y[t]==f[t]; 
ic={y[0]==0,Derivative[1][y][0] == 0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-2 t} \left (\int _1^t-e^{2 K[1]} f(K[1])dK[1]+e^t \left (\int _1^te^{K[2]} f(K[2])dK[2]-\int _1^0e^{K[2]} f(K[2])dK[2]\right )-\int _1^0-e^{2 K[1]} f(K[1])dK[1]\right ) \]
Sympy. Time used: 0.786 (sec). Leaf size: 46
from sympy import * 
t = symbols("t") 
y = Function("y") 
f = Function("f") 
ode = Eq(-f(t) + 2*y(t) + 3*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (\left (- \int f{\left (t \right )} e^{2 t}\, dt + \int \limits ^{0} f{\left (t \right )} e^{2 t}\, dt\right ) e^{- t} + \int f{\left (t \right )} e^{t}\, dt - \int \limits ^{0} f{\left (t \right )} e^{t}\, dt\right ) e^{- t} \]