80.7.15 problem B 7

Internal problem ID [21334]
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 : B 7
Date solved : Thursday, October 02, 2025 at 07:28:31 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=x+2 y \left (t \right )+2 t\\ y^{\prime }\left (t \right )&=3 y \left (t \right )+t^{2} \end{align*}
Maple. Time used: 0.066 (sec). Leaf size: 43
ode:=[diff(x(t),t) = x(t)+2*y(t)+2*t, diff(y(t),t) = 3*y(t)+t^2]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= -\frac {2}{27}-\frac {2 t}{9}+\frac {2 t^{2}}{3}+{\mathrm e}^{3 t} c_2 +c_1 \,{\mathrm e}^{t} \\ y \left (t \right ) &= -\frac {t^{2}}{3}-\frac {2 t}{9}-\frac {2}{27}+{\mathrm e}^{3 t} c_2 \\ \end{align*}
Mathematica. Time used: 0.116 (sec). Leaf size: 66
ode={D[x[t],t]==x[t]+2*y[t]+2*t,D[y[t],t]==3*y[t]+t^2}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {2 t^2}{3}-\frac {2 t}{9}+(c_1-c_2) e^t+c_2 e^{3 t}-\frac {2}{27}\\ y(t)&\to \frac {1}{27} \left (-9 t^2-6 t-2\right )+c_2 e^{3 t} \end{align*}
Sympy. Time used: 0.093 (sec). Leaf size: 51
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-2*t - x(t) - 2*y(t) + Derivative(x(t), t),0),Eq(t**2 - 3*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^{t} + C_{2} e^{3 t} - \frac {2 t^{2}}{3} - \frac {34 t}{9} - \frac {106}{27}, \ y{\left (t \right )} = C_{2} e^{3 t} + \frac {t^{2}}{3} + \frac {2 t}{9} + \frac {2}{27}\right ] \]