14.29.9 problem 9

Internal problem ID [2807]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 4. Qualitative theory of differential equations. Section 4.2 (Stability of linear systems). Page 383
Problem number : 9
Date solved : Tuesday, March 04, 2025 at 02:42:55 PM
CAS classification : system_of_ODEs

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

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