10.18.9 problem 9

Internal problem ID [1436]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 7.9, Nonhomogeneous Linear Systems. page 447
Problem number : 9
Date solved : Tuesday, March 04, 2025 at 12:35:52 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.030 (sec). Leaf size: 50
ode:=[diff(x__1(t),t) = -5/4*x__1(t)+3/4*x__2(t)+2*t, diff(x__2(t),t) = 3/4*x__1(t)-5/4*x__2(t)+exp(t)]; 
dsolve(ode);
 
\begin{align*} x_{1} \left (t \right ) &= c_2 \,{\mathrm e}^{-\frac {t}{2}}+c_1 \,{\mathrm e}^{-2 t}+\frac {5 t}{2}-\frac {17}{4}+\frac {{\mathrm e}^{t}}{6} \\ x_{2} \left (t \right ) &= c_2 \,{\mathrm e}^{-\frac {t}{2}}-c_1 \,{\mathrm e}^{-2 t}-\frac {15}{4}+\frac {{\mathrm e}^{t}}{2}+\frac {3 t}{2} \\ \end{align*}
Mathematica. Time used: 0.413 (sec). Leaf size: 101
ode={D[ x1[t],t]==-5/4*x1[t]+3/4*x2[t]+2*t,D[ x2[t],t]==3/4*x1[t]-5/4*x2[t]+Exp[t]}; 
ic={}; 
DSolve[{ode,ic},{x1[t],x2[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} \text {x1}(t)\to \frac {1}{12} \left (30 t+2 e^t+6 (c_1-c_2) e^{-2 t}+6 (c_1+c_2) e^{-t/2}-51\right ) \\ \text {x2}(t)\to \frac {1}{4} e^{-2 t} \left (3 e^{2 t} (2 t-5)+2 e^{3 t}+2 (c_1+c_2) e^{3 t/2}-2 c_1+2 c_2\right ) \\ \end{align*}
Sympy. Time used: 0.222 (sec). Leaf size: 58
from sympy import * 
t = symbols("t") 
x__1 = Function("x__1") 
x__2 = Function("x__2") 
ode=[Eq(-2*t + 5*x__1(t)/4 - 3*x__2(t)/4 + Derivative(x__1(t), t),0),Eq(-3*x__1(t)/4 + 5*x__2(t)/4 - exp(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} e^{- \frac {t}{2}} - C_{2} e^{- 2 t} + \frac {5 t}{2} + \frac {e^{t}}{6} - \frac {17}{4}, \ x^{2}{\left (t \right )} = C_{1} e^{- \frac {t}{2}} + C_{2} e^{- 2 t} + \frac {3 t}{2} + \frac {e^{t}}{2} - \frac {15}{4}\right ] \]