40.15.4 problem 13

Internal problem ID [6790]
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 : 13
Date solved : Sunday, March 30, 2025 at 11:22:55 AM
CAS classification : system_of_ODEs

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

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