67.7.16 problem Problem 6(d)

Internal problem ID [14048]
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 6(d)
Date solved : Wednesday, March 05, 2025 at 10:27:30 PM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right ) = 1\\ y \left (0\right ) = 2\\ z \left (0\right ) = 3 \end{align*}

Maple. Time used: 0.088 (sec). Leaf size: 85
ode:=[diff(x(t),t) = -3*x(t)+y(t)-3*z(t)+2*exp(t), diff(y(t),t) = 4*x(t)-y(t)+2*z(t)+4*exp(t), diff(z(t),t) = 4*x(t)-2*y(t)+3*z(t)+4*exp(t)]; 
ic:=x(0) = 1y(0) = 2z(0) = 3; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= -\frac {3 \,{\mathrm e}^{t}}{2}-2 \sin \left (2 t \right ) {\mathrm e}^{-t}+\frac {5 \,{\mathrm e}^{-t} \cos \left (2 t \right )}{2} \\ y &= \frac {5 \,{\mathrm e}^{t}}{2}+\frac {9 \sin \left (2 t \right ) {\mathrm e}^{-t}}{2}-\frac {{\mathrm e}^{-t} \cos \left (2 t \right )}{2} \\ z \left (t \right ) &= \frac {7 \,{\mathrm e}^{t}}{2}-\frac {{\mathrm e}^{-t} \cos \left (2 t \right )}{2}+\frac {9 \sin \left (2 t \right ) {\mathrm e}^{-t}}{2} \\ \end{align*}
Mathematica. Time used: 0.14 (sec). Leaf size: 1466
ode={D[x[t],t]==-3*x[t]+y[t]-3*z[t]+2*Exp[t],D[y[t],t]==4*x[t]-y[t]+2*z[t]+4*Exp[t],D[z[t],t]==4*x[t]-2*y[t]+3*z[t]+4*Exp[t]}; 
ic={x[0]==1,y[0]==2,z[0]==3}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy. Time used: 0.356 (sec). Leaf size: 162
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(3*x(t) - y(t) + 3*z(t) - 2*exp(t) + Derivative(x(t), t),0),Eq(-4*x(t) + y(t) - 2*z(t) - 4*exp(t) + Derivative(y(t), t),0),Eq(-4*x(t) + 2*y(t) - 3*z(t) - 4*exp(t) + Derivative(z(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{3} e^{t} - \left (\frac {C_{1}}{2} - \frac {C_{2}}{2}\right ) e^{- t} \sin {\left (2 t \right )} - \left (\frac {C_{1}}{2} + \frac {C_{2}}{2}\right ) e^{- t} \cos {\left (2 t \right )} - e^{t} \sin ^{2}{\left (2 t \right )} - e^{t} \cos ^{2}{\left (2 t \right )}, \ y{\left (t \right )} = C_{1} e^{- t} \cos {\left (2 t \right )} - C_{2} e^{- t} \sin {\left (2 t \right )} - C_{3} e^{t} + 3 e^{t} \sin ^{2}{\left (2 t \right )} + 3 e^{t} \cos ^{2}{\left (2 t \right )}, \ z{\left (t \right )} = C_{1} e^{- t} \cos {\left (2 t \right )} - C_{2} e^{- t} \sin {\left (2 t \right )} + C_{3} e^{t} + 3 e^{t} \sin ^{2}{\left (2 t \right )} + 3 e^{t} \cos ^{2}{\left (2 t \right )}\right ] \]