64.16.6 problem 6

Internal problem ID [13530]
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 : 6
Date solved : Wednesday, March 05, 2025 at 10:03:17 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.102 (sec). Leaf size: 41
ode:=[2*diff(x(t),t)+diff(y(t),t)-3*x(t)-y(t) = t, diff(x(t),t)+diff(y(t),t)-4*x(t)-y(t) = exp(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= t -1-\frac {{\mathrm e}^{t}}{2}+c_{2} {\mathrm e}^{-t} \\ y \left (t \right ) &= -\frac {5 c_{2} {\mathrm e}^{-t}}{2}-4 t +1+c_{1} {\mathrm e}^{t}-\frac {{\mathrm e}^{t} t}{2} \\ \end{align*}
Mathematica. Time used: 0.71 (sec). Leaf size: 143
ode={2*D[x[t],t]+D[y[t],t]-3*x[t]-y[t]==t,D[x[t],t]+D[y[t],t]+4*x[t]-y[t]==Exp[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^{7 t} \left (\int _1^te^{-7 K[1]} \left (K[1]-e^{K[1]}\right )dK[1]+c_1\right ) \\ y(t)\to \frac {1}{6} e^t \left (-11 \left (e^{6 t}-1\right ) \int _1^te^{-7 K[1]} \left (K[1]-e^{K[1]}\right )dK[1]+6 \int _1^t\frac {1}{6} e^{-7 K[2]} \left (5 e^{6 K[2]} K[2]-11 K[2]+11 e^{K[2]}+e^{7 K[2]}\right )dK[2]-11 c_1 e^{6 t}+11 c_1+6 c_2\right ) \\ \end{align*}
Sympy. Time used: 0.175 (sec). Leaf size: 46
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-t - 3*x(t) - y(t) + 2*Derivative(x(t), t) + Derivative(y(t), t),0),Eq(-4*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 )} = - \frac {2 C_{1} e^{- t}}{5} + t - \frac {e^{t}}{2} - 1, \ y{\left (t \right )} = C_{1} e^{- t} - \frac {t e^{t}}{2} - 4 t + \left (C_{2} + \frac {5}{4}\right ) e^{t} + 1\right ] \]