76.6.18 problem 20

Internal problem ID [17402]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 3. Systems of two first order equations. Section 3.2 (Two first order linear differential equations). Problems at page 142
Problem number : 20
Date solved : Monday, March 31, 2025 at 04:12:57 PM
CAS classification : system_of_ODEs

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

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