67.7.7 problem Problem 4(c)

Internal problem ID [14039]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 8.3 Systems of Linear Differential Equations (Variation of Parameters). Problems page 514
Problem number : Problem 4(c)
Date solved : Wednesday, March 05, 2025 at 10:26:45 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.142 (sec). Leaf size: 76
ode:=[diff(x(t),t) = -2*x(t)-2*y(t)+4*z(t), diff(y(t),t) = -2*x(t)+y(t)+2*z(t), diff(z(t),t) = -4*x(t)-2*y(t)+6*z(t)+exp(2*t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= \left ({\mathrm e}^{t} \left (4 t +c_{2} -4\right )+c_{3} \right ) {\mathrm e}^{t} \\ y &= \left (\frac {c_{2}}{2}+2 t -2+c_{1} \right ) {\mathrm e}^{2 t}+\frac {c_{3} {\mathrm e}^{t}}{2} \\ z \left (t \right ) &= \frac {5 c_{2} {\mathrm e}^{2 t}}{4}+5 t \,{\mathrm e}^{2 t}+\frac {c_{1} {\mathrm e}^{2 t}}{2}-4 \,{\mathrm e}^{2 t}+c_{3} {\mathrm e}^{t} \\ \end{align*}
Mathematica. Time used: 0.014 (sec). Leaf size: 118
ode={D[x[t],t]==-2*x[t]-2*y[t]+4*z[t],D[y[t],t]==-2*x[t]+y[t]+2*z[t],D[z[t],t]==-4*x[t]-2*y[t]+6*z[t]+Exp[2*t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^t \left (e^t (4 t-4-3 c_1-2 c_2+4 c_3)+2 (2 c_1+c_2-2 c_3)\right ) \\ y(t)\to e^t \left (2 e^t (t-1-c_1+c_3)+2 c_1+c_2-2 c_3\right ) \\ z(t)\to e^t \left (e^t (5 t-4-4 c_1-2 c_2+5 c_3)+2 (2 c_1+c_2-2 c_3)\right ) \\ \end{align*}
Sympy. Time used: 0.211 (sec). Leaf size: 76
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(2*x(t) + 2*y(t) - 4*z(t) + Derivative(x(t), t),0),Eq(2*x(t) - y(t) - 2*z(t) + Derivative(y(t), t),0),Eq(4*x(t) + 2*y(t) - 6*z(t) - exp(2*t) + Derivative(z(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{t} + 4 t e^{2 t} - \left (\frac {C_{2}}{2} - C_{3} + 4\right ) e^{2 t}, \ y{\left (t \right )} = \frac {C_{1} e^{t}}{2} + 2 t e^{2 t} + \left (C_{2} - 2\right ) e^{2 t}, \ z{\left (t \right )} = C_{1} e^{t} + 5 t e^{2 t} + \left (C_{3} - 4\right ) e^{2 t}\right ] \]