58.16.5 problem 5

Internal problem ID [14889]
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 : 5
Date solved : Thursday, October 02, 2025 at 09:56:14 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 )&={\mathrm e}^{-t}\\ \frac {d}{d t}x \left (t \right )+2 x \left (t \right )+\frac {d}{d t}y \left (t \right )+y \left (t \right )&={\mathrm e}^{t} \end{align*}
Maple. Time used: 0.135 (sec). Leaf size: 47
ode:=[2*diff(x(t),t)+diff(y(t),t)-x(t)-y(t) = exp(-t), diff(x(t),t)+diff(y(t),t)+2*x(t)+y(t) = exp(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= c_1 \sin \left (t \right )+c_2 \cos \left (t \right ) \\ y \left (t \right ) &= \frac {c_1 \cos \left (t \right )}{2}-\frac {3 c_2 \cos \left (t \right )}{2}-\frac {3 c_1 \sin \left (t \right )}{2}-\frac {c_2 \sin \left (t \right )}{2}+\frac {{\mathrm e}^{t}}{2}-\frac {{\mathrm e}^{-t}}{2} \\ \end{align*}
Mathematica. Time used: 0.103 (sec). Leaf size: 60
ode={2*D[x[t],t]+D[y[t],t]-x[t]-y[t]==Exp[-t],D[x[t],t]+D[y[t],t]+2*x[t]+y[t]==Exp[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to c_1 \cos (t)+(3 c_1+2 c_2) \sin (t)\\ y(t)&\to \frac {1}{2} \left (-e^{-t}+e^t+2 c_2 \cos (t)-2 (5 c_1+3 c_2) \sin (t)\right ) \end{align*}
Sympy. Time used: 0.257 (sec). Leaf size: 78
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) - exp(-t),0),Eq(2*x(t) + y(t) - exp(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 )} = \left (\frac {C_{1}}{5} + \frac {3 C_{2}}{5}\right ) \sin {\left (t \right )} - \left (\frac {3 C_{1}}{5} - \frac {C_{2}}{5}\right ) \cos {\left (t \right )}, \ y{\left (t \right )} = C_{1} \cos {\left (t \right )} - C_{2} \sin {\left (t \right )} + \frac {e^{t} \sin ^{2}{\left (t \right )}}{2} + \frac {e^{t} \cos ^{2}{\left (t \right )}}{2} - \frac {e^{- t} \sin ^{2}{\left (t \right )}}{2} - \frac {e^{- t} \cos ^{2}{\left (t \right )}}{2}\right ] \]