28.4.10 problem 7.10

Internal problem ID [4542]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 7. Systems of linear differential equations. Problems at page 351
Problem number : 7.10
Date solved : Tuesday, March 04, 2025 at 06:52:07 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.058 (sec). Leaf size: 45
ode:=[diff(x(t),t)-x(t)-2*y(t) = exp(t), -4*x(t)+diff(y(t),t)-3*y(t) = 1]; 
dsolve(ode);
 
\begin{align*} x &= \frac {c_{2} {\mathrm e}^{5 t}}{2}-{\mathrm e}^{-t} c_{1} +\frac {{\mathrm e}^{t}}{4}-\frac {2}{5} \\ y &= c_{2} {\mathrm e}^{5 t}+{\mathrm e}^{-t} c_{1} -\frac {{\mathrm e}^{t}}{2}+\frac {1}{5} \\ \end{align*}
Mathematica. Time used: 0.077 (sec). Leaf size: 91
ode={D[x[t],t]-x[t]-2*y[t]==Exp[t],-4*x[t]+D[y[t],t]-3*y[t]==1}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{60} e^{-t} \left (-24 e^t+15 e^{2 t}+20 (c_1+c_2) e^{6 t}+40 c_1-20 c_2\right ) \\ y(t)\to -\frac {e^t}{2}+\frac {1}{3} (c_2-2 c_1) e^{-t}+\frac {2}{3} (c_1+c_2) e^{5 t}+\frac {1}{5} \\ \end{align*}
Sympy. Time used: 0.207 (sec). Leaf size: 46
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-x(t) - 2*y(t) - exp(t) + Derivative(x(t), t),0),Eq(-4*x(t) - 3*y(t) + Derivative(y(t), t) - 1,0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{1} e^{- t} + \frac {C_{2} e^{5 t}}{2} + \frac {e^{t}}{4} - \frac {2}{5}, \ y{\left (t \right )} = C_{1} e^{- t} + C_{2} e^{5 t} - \frac {e^{t}}{2} + \frac {1}{5}\right ] \]