64.16.13 problem 13

Internal problem ID [13545]
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 : 13
Date solved : Monday, March 31, 2025 at 08:00:57 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 )&=t^{2}+4 t\\ \frac {d}{d t}x \left (t \right )+\frac {d}{d t}y \left (t \right )+2 x \left (t \right )+2 y \left (t \right )&=2 t^{2}-2 t \end{align*}

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