82.56.3 problem Ex. 4

Internal problem ID [18964]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter XI. Ordinary differential equations with more than two variables. End of chapter problems at page 143
Problem number : Ex. 4
Date solved : Thursday, March 13, 2025 at 01:13:30 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.036 (sec). Leaf size: 50
ode:=[diff(x(t),t)+4*x(t)+3*y(t) = t, diff(y(t),t)+2*x(t)+5*y(t) = exp(t)]; 
dsolve(ode);
 
\begin{align*} x &= c_{2} {\mathrm e}^{-2 t}+{\mathrm e}^{-7 t} c_{1} -\frac {31}{196}-\frac {{\mathrm e}^{t}}{8}+\frac {5 t}{14} \\ y &= -\frac {2 c_{2} {\mathrm e}^{-2 t}}{3}+{\mathrm e}^{-7 t} c_{1} +\frac {5 \,{\mathrm e}^{t}}{24}+\frac {9}{98}-\frac {t}{7} \\ \end{align*}
Mathematica. Time used: 0.192 (sec). Leaf size: 109
ode={D[x[t],t]+4*x[t]+3*y[t]==t,D[y[t],t]+2*x[t]+5*y[t]==Exp[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{196} (70 t-31)-\frac {e^t}{8}+\frac {3}{5} (c_1-c_2) e^{-2 t}+\frac {1}{5} (2 c_1+3 c_2) e^{-7 t} \\ y(t)\to -\frac {t}{7}+\frac {5 e^t}{24}-\frac {2}{5} (c_1-c_2) e^{-2 t}+\frac {1}{5} (2 c_1+3 c_2) e^{-7 t}+\frac {9}{98} \\ \end{align*}
Sympy. Time used: 0.249 (sec). Leaf size: 61
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-t + 4*x(t) + 3*y(t) + Derivative(x(t), t),0),Eq(2*x(t) + 5*y(t) - exp(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \frac {3 C_{1} e^{- 2 t}}{2} + C_{2} e^{- 7 t} + \frac {5 t}{14} - \frac {e^{t}}{8} - \frac {31}{196}, \ y{\left (t \right )} = C_{1} e^{- 2 t} + C_{2} e^{- 7 t} - \frac {t}{7} + \frac {5 e^{t}}{24} + \frac {9}{98}\right ] \]