78.4.10 problem 12.b

Internal problem ID [21038]
Book : A FIRST COURSE IN DIFFERENTIAL EQUATIONS FOR SCIENTISTS AND ENGINEERS. By Russell Herman. University of North Carolina Wilmington. LibreText. compiled on 06/09/2025
Section : Chapter 5, Laplace transforms. Problems section 5.7
Problem number : 12.b
Date solved : Thursday, October 02, 2025 at 07:01:40 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }\left (t \right )&=-4 x \left (t \right )-y+{\mathrm e}^{-t}\\ y^{\prime }&=x \left (t \right )-2 y+2 \,{\mathrm e}^{-3 t} \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=2 \\ y \left (0\right )&=-1 \\ \end{align*}
Maple. Time used: 0.220 (sec). Leaf size: 64
ode:=[diff(x(t),t) = -4*x(t)-y(t)+exp(-t), diff(y(t),t) = x(t)-2*y(t)+2*exp(-3*t)]; 
ic:=[x(0) = 2, y(0) = -1]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= \frac {7 \,{\mathrm e}^{-3 t}}{4}-\frac {{\mathrm e}^{-3 t} t}{2}+\frac {{\mathrm e}^{-t}}{4}-{\mathrm e}^{-3 t} t^{2} \\ y \left (t \right ) &= \frac {5 \,{\mathrm e}^{-3 t} t}{2}+{\mathrm e}^{-3 t} t^{2}-\frac {5 \,{\mathrm e}^{-3 t}}{4}+\frac {{\mathrm e}^{-t}}{4} \\ \end{align*}
Mathematica. Time used: 0.065 (sec). Leaf size: 56
ode={D[x[t],t]==-4*x[t]-y[t]+Exp[-t],D[y[t],t]==x[t]-2*y[t]+2*Exp[-3*t]}; 
ic={x[0]==2,y[0]==-1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{4} e^{-3 t} \left (-4 t^2-2 t+e^{2 t}+7\right )\\ y(t)&\to \frac {1}{4} e^{-3 t} \left (4 t^2+10 t+e^{2 t}-5\right ) \end{align*}
Sympy. Time used: 0.195 (sec). Leaf size: 70
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(4*x(t) + y(t) + Derivative(x(t), t) - exp(-t),0),Eq(-x(t) + 2*y(t) + Derivative(y(t), t) - 2*exp(-3*t),0)] 
ics = {x(0): 2, y(0): -1} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - t^{2} e^{- 3 t} - \frac {t e^{- 3 t}}{2} + \frac {e^{- t}}{4} + \frac {7 e^{- 3 t}}{4}, \ y{\left (t \right )} = t^{2} e^{- 3 t} + \frac {5 t e^{- 3 t}}{2} + \frac {e^{- t}}{4} - \frac {5 e^{- 3 t}}{4}\right ] \]