71.19.7 problem 7

Internal problem ID [14528]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 10. Applications of Systems of Equations. Exercises 10.2 page 432
Problem number : 7
Date solved : Monday, March 31, 2025 at 12:29:36 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )&=-5 x \left (t \right )-y \left (t \right )+2\\ \frac {d}{d t}y \left (t \right )&=3 x \left (t \right )-y \left (t \right )-3 \end{align*}

Maple. Time used: 0.132 (sec). Leaf size: 38
ode:=[diff(x(t),t) = -5*x(t)-y(t)+2, diff(y(t),t) = 3*x(t)-y(t)-3]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= \frac {5}{8}-\frac {{\mathrm e}^{-4 t} c_1}{2}+{\mathrm e}^{-2 t} c_2 \\ y \left (t \right ) &= \frac {{\mathrm e}^{-4 t} c_1}{2}-3 \,{\mathrm e}^{-2 t} c_2 -\frac {9}{8} \\ \end{align*}
Mathematica. Time used: 0.036 (sec). Leaf size: 93
ode={D[x[t],t]==-5*x[t]-y[t]+2,D[y[t],t]==3*x[t]-1*y[t]-3}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{48} e^{-4 t} \left (30 e^{4 t}-(1+24 c_1+24 c_2) e^{2 t}+3+72 c_1+24 c_2\right ) \\ y(t)\to \frac {1}{16} e^{-4 t} \left (-18 e^{4 t}+(1+24 c_1+24 c_2) e^{2 t}-1-24 c_1-8 c_2\right ) \\ \end{align*}
Sympy. Time used: 0.185 (sec). Leaf size: 39
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(5*x(t) + y(t) + Derivative(x(t), t) - 2,0),Eq(-3*x(t) + y(t) + Derivative(y(t), t) + 3,0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \frac {C_{1} e^{- 2 t}}{3} - C_{2} e^{- 4 t} + \frac {5}{8}, \ y{\left (t \right )} = C_{1} e^{- 2 t} + C_{2} e^{- 4 t} - \frac {9}{8}\right ] \]