64.18.4 problem 24

Internal problem ID [13556]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 7, Systems of linear differential equations. Section 7.4. Exercises page 309
Problem number : 24
Date solved : Monday, March 31, 2025 at 08:01:13 AM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right ) = 6\\ y \left (0\right ) = 2 \end{align*}

Maple. Time used: 0.133 (sec). Leaf size: 31
ode:=[diff(x(t),t) = -2*x(t)+y(t), diff(y(t),t) = 7*x(t)+4*y(t)]; 
ic:=x(0) = 6y(0) = 2; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= 5 \,{\mathrm e}^{-3 t}+{\mathrm e}^{5 t} \\ y \left (t \right ) &= -5 \,{\mathrm e}^{-3 t}+7 \,{\mathrm e}^{5 t} \\ \end{align*}
Mathematica. Time used: 0.004 (sec). Leaf size: 36
ode={D[x[t],t]==-2*x[t]+y[t],D[y[t],t]==7*x[t]+4*y[t]}; 
ic={x[0]==6,y[0]==2}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^{-3 t} \left (e^{8 t}+5\right ) \\ y(t)\to e^{-3 t} \left (7 e^{8 t}-5\right ) \\ \end{align*}
Sympy. Time used: 0.101 (sec). Leaf size: 32
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(2*x(t) - y(t) + Derivative(x(t), t),0),Eq(-7*x(t) - 4*y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{1} e^{- 3 t} + \frac {C_{2} e^{5 t}}{7}, \ y{\left (t \right )} = C_{1} e^{- 3 t} + C_{2} e^{5 t}\right ] \]