40.15.1 problem 10

Internal problem ID [6787]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 21. System of simultaneous linear equations. Supplemetary problems. Page 163
Problem number : 10
Date solved : Sunday, March 30, 2025 at 11:22:50 AM
CAS classification : system_of_ODEs

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

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