80.7.10 problem A 10

Internal problem ID [21329]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 7. System of first order equations. Excercise 7.6 at page 162
Problem number : A 10
Date solved : Thursday, October 02, 2025 at 07:28:29 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=3 x+t\\ y^{\prime }\left (t \right )&=-y \left (t \right )+2 t \end{align*}
Maple. Time used: 0.052 (sec). Leaf size: 29
ode:=[diff(x(t),t) = 3*x(t)+t, diff(y(t),t) = -y(t)+2*t]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= -\frac {t}{3}-\frac {1}{9}+{\mathrm e}^{3 t} c_2 \\ y \left (t \right ) &= 2 t -2+{\mathrm e}^{-t} c_1 \\ \end{align*}
Mathematica. Time used: 0.055 (sec). Leaf size: 38
ode={D[x[t],t]==3*x[t]+t,D[y[t],t]==-y[t]+2*t}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -\frac {t}{3}+c_1 e^{3 t}-\frac {1}{9}\\ y(t)&\to 2 t+c_2 e^{-t}-2 \end{align*}
Sympy. Time used: 0.074 (sec). Leaf size: 27
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-t - 3*x(t) + Derivative(x(t), t),0),Eq(-2*t + y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{3 t} - \frac {t}{3} - \frac {1}{9}, \ y{\left (t \right )} = C_{2} e^{- t} + 2 t - 2\right ] \]