80.7.26 problem C 4

Internal problem ID [21345]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 7. System of first order equations. Excercise 7.6 at page 162
Problem number : C 4
Date solved : Thursday, October 02, 2025 at 07:28:39 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=x+z \left (t \right )\\ y^{\prime }\left (t \right )&=-y \left (t \right )\\ z^{\prime }\left (t \right )&=4 z \left (t \right ) \end{align*}

With initial conditions

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