im trying to solve a system of differential equations of (x''(t ) + 5(x(t )) - 2y(t ) = 0
and, -2*x(t ) + y''(t ) +2*y(t ) = 0
but I keep getting the wrong answer..
Here's an outline of the solution. Write the equations as
$\displaystyle x'' = -5x+2y$
$\displaystyle y'' = 2x-2y,$
or in vector form $\displaystyle \begin{bmatrix}x''\\y''\end{bmatrix} = \begin{bmatrix}-5&2\\2&-2\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}$.
Now diagonalise that matrix $\displaystyle A = \begin{bmatrix}-5&2\\2&-2\end{bmatrix}$. You should find that the eigenvalues are –1 and –6, with corresponding eigenvectors $\displaystyle \begin{bmatrix}1\\2\end{bmatrix}$ and $\displaystyle \begin{bmatrix}-2\\1\end{bmatrix}$. Let P be the matrix having those eigenvectors as columns, and let D be the diagonal matrix with the eigenvalues –1 and –6 as its diagonal elements. Then $\displaystyle A = PDP^{-1}$ and so $\displaystyle P^{-1}\begin{bmatrix}x''\\y''\end{bmatrix} = DP^{-1}\begin{bmatrix}x\\y\end{bmatrix}$.
Let $\displaystyle \begin{bmatrix}u\\v\end{bmatrix} = P^{-1}\begin{bmatrix}x\\y\end{bmatrix}$. Then $\displaystyle u'' = -u$ and $\displaystyle v'' = -6v$. Those are simple harmonic motion equations, with solutions $\displaystyle u = A\cos t + B\sin t$, $\displaystyle v = C\cos(\sqrt6t)+D\sin(\sqrt6t)$.
Finally, $\displaystyle \begin{bmatrix}x\\y\end{bmatrix} = P\begin{bmatrix}u\\v\end{bmatrix}$, giving the solution
$\displaystyle x(t) = A\cos t + B\sin t -2(C\cos(\sqrt6t)+D\sin(\sqrt6t)),$
$\displaystyle y(t) = 2(A\cos t + B\sin t) + C\cos(\sqrt6t)+D\sin(\sqrt6t).$