58.16.17 problem 17

Internal problem ID [14901]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 7, Systems of linear differential equations. Section 7.1. Exercises page 277
Problem number : 17
Date solved : Thursday, October 02, 2025 at 09:56:25 AM
CAS classification : system_of_ODEs

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