76.19.21 problem 21

Internal problem ID [17666]
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.4 (Solving differential equations with Laplace transform). Problems at page 327
Problem number : 21
Date solved : Thursday, March 13, 2025 at 10:46:12 AM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}y_{1} \left (t \right )&=5 y_{1} \left (t \right )-y_{2} \left (t \right )+{\mathrm e}^{-t}\\ \frac {d}{d t}y_{2} \left (t \right )&=y_{1} \left (t \right )+3 y_{2} \left (t \right )+2 \,{\mathrm e}^{t} \end{align*}

With initial conditions

\begin{align*} y_{1} \left (0\right ) = -3\\ y_{2} \left (0\right ) = 2 \end{align*}

Maple. Time used: 0.700 (sec). Leaf size: 55
ode:=[diff(y__1(t),t) = 5*y__1(t)-y__2(t)+exp(-t), diff(y__2(t),t) = y__1(t)+3*y__2(t)+2*exp(t)]; 
ic:=y__1(0) = -3y__2(0) = 2; 
dsolve([ode,ic]);
 
\begin{align*} y_{1} \left (t \right ) &= -\frac {589 \,{\mathrm e}^{4 t}}{225}-\frac {82 \,{\mathrm e}^{4 t} t}{15}-\frac {2 \,{\mathrm e}^{t}}{9}-\frac {4 \,{\mathrm e}^{-t}}{25} \\ y_{2} \left (t \right ) &= \frac {641 \,{\mathrm e}^{4 t}}{225}-\frac {82 \,{\mathrm e}^{4 t} t}{15}-\frac {8 \,{\mathrm e}^{t}}{9}+\frac {{\mathrm e}^{-t}}{25} \\ \end{align*}
Mathematica. Time used: 0.181 (sec). Leaf size: 66
ode={D[y1[t],t]==5*y1[t]-1*y2[t]+Exp[-t],D[y2[t],t]==1*y1[t]+3*y2[t]+2*Exp[t]}; 
ic={y1[0]==3,y2[0]==2}; 
DSolve[{ode,ic},{y1[t],y2[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} \text {y1}(t)\to \frac {1}{225} e^{-t} \left (e^{5 t} (120 t+761)-50 e^{2 t}-36\right ) \\ \text {y2}(t)\to \frac {1}{225} e^{-t} \left (e^{5 t} (120 t+641)-200 e^{2 t}+9\right ) \\ \end{align*}
Sympy. Time used: 0.237 (sec). Leaf size: 63
from sympy import * 
t = symbols("t") 
y__1 = Function("y__1") 
y__2 = Function("y__2") 
ode=[Eq(-5*y__1(t) + y__2(t) + Derivative(y__1(t), t) - exp(-t),0),Eq(-y__1(t) - 3*y__2(t) - 2*exp(t) + Derivative(y__2(t), t),0)] 
ics = {} 
dsolve(ode,func=[y__1(t),y__2(t)],ics=ics)
 
\[ \left [ y^{1}{\left (t \right )} = C_{1} t e^{4 t} + \left (C_{1} + C_{2}\right ) e^{4 t} - \frac {2 e^{t}}{9} - \frac {4 e^{- t}}{25}, \ y^{2}{\left (t \right )} = C_{1} t e^{4 t} + C_{2} e^{4 t} - \frac {8 e^{t}}{9} + \frac {e^{- t}}{25}\right ] \]