For a homogeneous 2nd-order ODE like
$$ay''+by'+cy=0$$
I have a system of ODE's from an (unknown) 2nd-order ODE:
$$ \begin{pmatrix} x_1' \\ x_2' \end{pmatrix} = \begin{pmatrix} 2 & -5 \\ 1 & -2 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}$$
The eigenvalues are $\pm i$ and one of the eigenvectors is
$$k=\begin{pmatrix} 5 \\ 2-i \end{pmatrix} = \begin{pmatrix} 5 \\ 2 \end{pmatrix} +i \begin{pmatrix} 0 \\ -1 \end{pmatrix} = a+ib$$
The general solution for complex roots is
$$x = c_1 e^{\lambda t} (a \cos(\mu t)-b \sin(\mu t)) + c_2 (a \sin(\mu t)+b \cos(\mu t))$$
where $\lambda$ is the real part of the root and $\mu$ is the complex part. Substituting the values in I get
$$ \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = c_1 \begin{pmatrix} 5 \cos(t) \\ 2\cos(t)+\sin(t) \end{pmatrix} + c_2 \begin{pmatrix} 5 \sin(t) \\ 2 \sin(t)-\cos(t) \end{pmatrix}$$
From the original 2nd-order ODE above, $x_1 = y$ and $x_2 = y'$ so I can write
$$y = c_1 5 \cos(t) + c_2 5 \sin(t)$$
and
$$y'=c_1 (2 \cos(t)+\sin(t)) + c_2 (2 \sin(t)-\cos(t))$$
However, differentiating the above expression for $y$ does not give the obtained expression for $y'$ except for the trivial case of $c_1 = c_2 = 0$. Why is this?
In contrast, when the roots are real, for example
$$y''-2y'-3y=0$$
can be written as
$$ \begin{pmatrix} x_1' \\ x_2' \end{pmatrix} = \begin{pmatrix} 0 & 1 \\ 3 & 2 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}$$
This system matrix has two real eigenvalues $-1$ and $3$ with eigenvectors $(1,3)$ and $(-1,1)$ giving a final solution of
$$ \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = c_1 \begin{pmatrix} 1 \\ 3 \end{pmatrix} e^{3t} + c_2 \begin{pmatrix} -1 \\ 1 \end{pmatrix} e^{-t}$$
and here, $x_1'=x_2$ as expected.