80.7.29 problem C 7

Internal problem ID [21348]
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 7
Date solved : Thursday, October 02, 2025 at 07:28:40 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 \left (t \right )\\ z^{\prime }\left (t \right )&=y \left (t \right )-z \left (t \right ) \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=0 \\ y \left (0\right )&=1 \\ z \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.069 (sec). Leaf size: 38
ode:=[diff(x(t),t) = x(t)+z(t), diff(y(t),t) = -y(t)+z(t), diff(z(t),t) = y(t)-z(t)]; 
ic:=[x(0) = 0, y(0) = 1, z(0) = 0]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= \frac {{\mathrm e}^{t}}{3}-\frac {1}{2}+\frac {{\mathrm e}^{-2 t}}{6} \\ y \left (t \right ) &= \frac {{\mathrm e}^{-2 t}}{2}+\frac {1}{2} \\ z \left (t \right ) &= \frac {1}{2}-\frac {{\mathrm e}^{-2 t}}{2} \\ \end{align*}
Mathematica. Time used: 0.009 (sec). Leaf size: 51
ode={D[x[t],t]==x[t]+z[t],D[y[t],t]==-y[t]+z[t],D[z[t],t]==y[t]-z[t]}; 
ic={x[0]==0,y[0]==1,z[0]==0}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{6} \left (e^{-2 t}+2 e^t-3\right )\\ y(t)&\to \frac {1}{2} \left (e^{-2 t}+1\right )\\ z(t)&\to \frac {1}{2}-\frac {e^{-2 t}}{2} \end{align*}
Sympy. Time used: 0.085 (sec). Leaf size: 46
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) - z(t) + Derivative(y(t), t),0),Eq(-y(t) + z(t) + Derivative(z(t), t),0)] 
ics = {x(0): 0, y(0): 1, z(0): 0} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = \frac {e^{t}}{3} - \frac {1}{2} + \frac {e^{- 2 t}}{6}, \ y{\left (t \right )} = \frac {1}{2} + \frac {e^{- 2 t}}{2}, \ z{\left (t \right )} = \frac {1}{2} - \frac {e^{- 2 t}}{2}\right ] \]