14.28.6 problem 11

Internal problem ID [2798]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 4. Qualitative theory of differential equations. Section 4.1 (Introduction). Page 377
Problem number : 11
Date solved : Sunday, March 30, 2025 at 12:20:41 AM
CAS classification : system_of_ODEs

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

With initial conditions

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

Maple. Time used: 0.229 (sec). Leaf size: 16
ode:=[diff(x(t),t) = x(t)+y(t)+z(t)-2*exp(-t), diff(y(t),t) = 2*x(t)+y(t)-z(t)-2*exp(-t), diff(z(t),t) = -3*x(t)+2*y(t)+4*z(t)+3*exp(-t)]; 
ic:=x(0) = 1y(0) = 0z(0) = 0; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{-t} \\ y \left (t \right ) &= 0 \\ z \left (t \right ) &= 0 \\ \end{align*}
Mathematica. Time used: 0.176 (sec). Leaf size: 18
ode={D[x[t],t]==x[t]+y[t]+z[t]-2*Exp[-t],D[y[t],t]==2*x[t]+y[t]-z[t]-2*Exp[-t],D[z[t],t]==-3*x[t]+2*y[t]+4*z[t]+3*Exp[-t]}; 
ic={x[0]==1,y[0]==0,z[0]==0}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^{-t} \\ y(t)\to 0 \\ z(t)\to 0 \\ \end{align*}
Sympy. Time used: 0.371 (sec). Leaf size: 95
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(-x(t) - y(t) - z(t) + Derivative(x(t), t) + 2*exp(-t),0),Eq(-2*x(t) - y(t) + z(t) + Derivative(y(t), t) + 2*exp(-t),0),Eq(3*x(t) - 2*y(t) - 4*z(t) + Derivative(z(t), t) - 3*exp(-t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{1} t e^{2 t} + \left (C_{1} - C_{2}\right ) e^{2 t} + e^{- t}, \ y{\left (t \right )} = - \frac {C_{1} t^{2} e^{2 t}}{2} + t \left (2 C_{1} - C_{2}\right ) e^{2 t} + \left (2 C_{2} - C_{3}\right ) e^{2 t}, \ z{\left (t \right )} = \frac {C_{1} t^{2} e^{2 t}}{2} - t \left (3 C_{1} - C_{2}\right ) e^{2 t} - \left (3 C_{2} - C_{3}\right ) e^{2 t}\right ] \]