78.5.22 problem 8.a

Internal problem ID [21061]
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 6, Linear systems. Problems section 6.9
Problem number : 8.a
Date solved : Thursday, October 02, 2025 at 07:01:52 PM
CAS classification : system_of_ODEs

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

With initial conditions

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