How to solve a system of ordinary differential equation squared? Say we are given a system of differential equations
\begin{cases} \frac{d^2x}{dt^2}=w\frac{dy}{dt} \\ \frac{d^2y}{dt^2}=-w\frac{dx}{dt}  \\ \frac{d^2z}{dt^2}=0\end{cases}
The teacher told us to use  $ u= \frac{dx}{dt}+i \frac{dy}{dt} $
I think it looks like that
$$\left[ \begin{array}{c} x' \\ y'\\ z' \end{array} \right] = \begin{bmatrix} w & 0 & 0\\ 0 & -w & 0 \\ 0&0&0 \end{bmatrix} \left[ \begin{array}{c} x \\ y \\ z \end{array} \right]$$
I guess we have to use $u$ to get the correct A(3x3) but how ?
 A: If $w$ is a constant then you can integrate the second DE:
$$y''=-wx'$$
$$\implies y'=-wx+c_1$$
And plug this in the first DE:
$$x''=wy'$$
$$x''=w(-wx+c_1)$$
$$x''+w^2x=c_1w$$
And solve the diferential equation.
$$ \implies x(t)=A\cos (wt)+B\sin(wt)+\dfrac {c_1}w$$
For $y$ we have:
$$y'(t)=-wx+c_1$$
$$ y'(t)=-w(A\cos (wt)+B\sin(wt))$$
$$ \implies y(t)=-A\sin (wt)+B\cos(wt)+c_2$$
The third DE can be integrated easily too.
$$\frac{d^2z}{dt^2}=0 \implies z(t)=k_1t+k_2$$

$$\begin{cases} \dfrac{d^2x}{dt^2}=w\dfrac{dy}{dt} \\ \dfrac{d^2y}{dt^2}=-w\dfrac{dx}{dt} \end{cases}$$
You can also use the substitution given by your teacher. For the first two differential equations you have :
$$u= \frac{dx}{dt}+i \frac{dy}{dt}$$
$$u'= \frac{d^2x}{dt^2}+i \frac{d^2y}{dt^2}$$
Multiply by $i$ the second differntial equation. Sum the differential equations. So that the system becomes:
$$u'=w\frac{dy}{dt}-iw \frac{dx}{dt}$$
$$u'=-i^2w\frac{dy}{dt}-iw \frac{dx}{dt}$$
$$u'=-iw\left(i\frac{dy}{dt}+ \frac{dx}{dt}\right)$$
$$u'(t)=-iwu(t)$$
$$u(t)=e^{-iwt}C$$
Back to $x(t),y(t)$
$$\pmatrix {x'(t) \\ y'(t)}=\pmatrix {\cos(wt) & \sin(wt) \\ -\sin(wt) & \cos(wt)}\pmatrix {C_1 \\ C_2}$$
