14.25.10 problem 11

Internal problem ID [2767]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Section 3.12, Systems of differential equations. The nonhomogeneous equation. variation of parameters. Page 366
Problem number : 11
Date solved : Sunday, March 30, 2025 at 12:16:53 AM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.136 (sec). Leaf size: 62
ode:=[diff(x__1(t),t) = x__1(t)-x__2(t)-t^2, diff(x__2(t),t) = x__1(t)+3*x__2(t)+2*t]; 
dsolve(ode);
 
\begin{align*} x_{1} \left (t \right ) &= {\mathrm e}^{2 t} c_2 +{\mathrm e}^{2 t} t c_1 +\frac {3 t^{2}}{4}+\frac {t}{2}+\frac {1}{8} \\ x_{2} \left (t \right ) &= -\frac {t^{2}}{4}-{\mathrm e}^{2 t} c_2 -{\mathrm e}^{2 t} t c_1 -{\mathrm e}^{2 t} c_1 -t -\frac {3}{8} \\ \end{align*}
Mathematica. Time used: 0.331 (sec). Leaf size: 94
ode={D[ x1[t],t]==1*x1[t]+3*x2[t]-t^2,D[ x2[t],t]==1*x1[t]+3*x2[t]+2*t}; 
ic={}; 
DSolve[{ode,ic},{x1[t],x2[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} \text {x1}(t)\to \frac {1}{128} \left (-32 t^3-88 t^2-44 t+32 c_1 \left (e^{4 t}+3\right )+96 c_2 e^{4 t}-11-96 c_2\right ) \\ \text {x2}(t)\to \frac {1}{384} \left (32 t^3+120 t^2-132 t+96 c_1 \left (e^{4 t}-1\right )+288 c_2 e^{4 t}-33+96 c_2\right ) \\ \end{align*}
Sympy. Time used: 0.192 (sec). Leaf size: 60
from sympy import * 
t = symbols("t") 
x__1 = Function("x__1") 
x__2 = Function("x__2") 
ode=[Eq(t**2 - x__1(t) + x__2(t) + Derivative(x__1(t), t),0),Eq(-2*t - x__1(t) - 3*x__2(t) + Derivative(x__2(t), t),0)] 
ics = {} 
dsolve(ode,func=[x__1(t),x__2(t)],ics=ics)
 
\[ \left [ x^{1}{\left (t \right )} = - C_{1} t e^{2 t} + \frac {3 t^{2}}{4} + \frac {t}{2} + \left (C_{1} - C_{2}\right ) e^{2 t} + \frac {1}{8}, \ x^{2}{\left (t \right )} = C_{1} t e^{2 t} + C_{2} e^{2 t} - \frac {t^{2}}{4} - t - \frac {3}{8}\right ] \]