52.10.36 problem 39

Internal problem ID [8430]
Book : DIFFERENTIAL EQUATIONS with Boundary Value Problems. DENNIS G. ZILL, WARREN S. WRIGHT, MICHAEL R. CULLEN. Brooks/Cole. Boston, MA. 2013. 8th edition.
Section : CHAPTER 8 SYSTEMS OF LINEAR FIRST-ORDER DIFFERENTIAL EQUATIONS. EXERCISES 8.2. Page 346
Problem number : 39
Date solved : Sunday, March 30, 2025 at 01:04:41 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )&=z \left (t \right )\\ \frac {d}{d t}y \left (t \right )&=-z \left (t \right )\\ \frac {d}{d t}z \left (t \right )&=y \left (t \right ) \end{align*}

Maple. Time used: 0.168 (sec). Leaf size: 40
ode:=[diff(x(t),t) = z(t), diff(y(t),t) = -z(t), diff(z(t),t) = y(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= -c_2 \cos \left (t \right )+c_3 \sin \left (t \right )+c_1 \\ y \left (t \right ) &= c_2 \cos \left (t \right )-c_3 \sin \left (t \right ) \\ z \left (t \right ) &= c_2 \sin \left (t \right )+c_3 \cos \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.008 (sec). Leaf size: 50
ode={D[x[t],t]==z[t],D[y[t],t]==-z[t],D[z[t],t]==y[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -c_2 \cos (t)+c_3 \sin (t)+c_1+c_2 \\ y(t)\to c_2 \cos (t)-c_3 \sin (t) \\ z(t)\to c_3 \cos (t)+c_2 \sin (t) \\ \end{align*}
Sympy. Time used: 0.091 (sec). Leaf size: 39
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(-z(t) + Derivative(x(t), t),0),Eq(z(t) + Derivative(y(t), t),0),Eq(-y(t) + Derivative(z(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} + C_{2} \sin {\left (t \right )} + C_{3} \cos {\left (t \right )}, \ y{\left (t \right )} = - C_{2} \sin {\left (t \right )} - C_{3} \cos {\left (t \right )}, \ z{\left (t \right )} = C_{2} \cos {\left (t \right )} - C_{3} \sin {\left (t \right )}\right ] \]