thanks to your help I advanced in computing differential equations, but now I encountered another problem I need help with - this time it is a system of differential equations:
$$x_1'=-x_2$$ $$x_2'=x_1$$
I know that the answer should contain trigonometric functions, (sine and cosine) but I have no idea how to start. I tried to divide first equation/second equation and I got something like:
$$\frac{x_1'}{x_2'}=-\frac{x2}{x1}$$
Then I rewrited x1' as $$\frac{dx1}{dt}$$ and did the same with x2. I got rid of dt this way and got a:
$$x_1dx_1=-x_2dx_2$$
Which lead me to result:
$$x_1=\sqrt(const-x_1^2)$$
After inserting x1 to the $$x_2'=x_1$$ equation I got some results, but neither of them contains sine or cosine. Could you point me what am I doing wrong?
One approach (other than just guessing) is to note that \begin{align*} x_1'' &= -x_2' \\ &= -x_1, \end{align*} so $x_1$ satisfies the ODE \begin{equation} x_1'' + x_1 = 0. \end{equation} This can be solved using standard methods for linear second order ODEs with constant coefficients.
Another approach, using linear algebra, is to work directly with the first order system \begin{equation} x'(t) = \underbrace{\begin{bmatrix} 0 & -1 \\1 & 0 \end{bmatrix}}_{A} x(t). \quad (\spadesuit) \end{equation} The eigenvalues of the coefficient matrix $A$ are $\lambda_1 = i, \lambda_2 = -i$. Finding corresponding eigenvectors $v_1$ and $v_2$ will yield the solutions \begin{align} u_1(t) &= e^{\lambda_1 t} v_1, \\ u_2(t) &= e^{\lambda_2 t} v_2. \end{align} Every solution to ($\spadesuit$) is a linear combination of $u_1$ and $u_2$: \begin{equation} x(t) = c_1 u_1(t) + c_2 u_2(t). \end{equation}