87.21.27 problem 27

Internal problem ID [23741]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 3. Linear Systems. Exercise at page 178
Problem number : 27
Date solved : Thursday, October 02, 2025 at 09:44:47 PM
CAS classification : system_of_ODEs

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

With initial conditions

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