Write the following linear differential equations with constant coefficients in the form of the linear system $\dot{x}=Ax$ and solve:

Write the following linear differential equations with constant coefficients in the form of the linear system $\dot{x}=Ax$ and solve:

(a) $\ddot{x}+\dot{x}-2x=0$

(b) $\ddot{x}+x=0$

(c)$\dddot{x}-2\ddot{x}-\dot{x}+2x=0$

Hint: Let $x_1 = x, x_2 =\dot{x}$, etc.

I have tried to do this in the following way but I do not know if I am doing well:

Let $x_1 = x, x_2 =\dot{x}, x_3=\ddot{x}, x_4=\dddot{x}$ , then the previous system becomes (a) $x_3+x_2-2x_1=0$, (b) $x_3+x_1=0$, (c) $x_4-x_3-x_2+2x_1=0$ and thus $\begin{bmatrix}x_1\\x_2 \\x_3 \\ x_4\end{bmatrix}=\begin{bmatrix}\frac{x_2}{3}\\x_2 \\\frac{-x_2}{3} \\ 0\end{bmatrix}$. Is this what it should be or is it different? Thank you very much.

Let $x_1 =\dot{x}, x_2=\ddot{x}, x_3=\dddot{x}$. No need to substitute $x$ as we want the final equations to be in the form of $Ax$. So $$\Biggl\{ \begin{array}{c} x_2+x_1=2x \\ x_2=-x \\ x_3-2x_2-x_1=-2x \end{array}$$ Substituting $x_2$ in the first equation, we get $x_1=3x$. Finally, we substitute $x_1, x_2$ in the last equation and we get $x_3=-x$. Now solve the final system $$\Biggl\{ \begin{array}{c} \dot{x}=3x \\ \ddot{x}=-x \\ \dddot{x}=-x \end{array}$$