<s>[INST] Solving ODE-systems with Matrix exponential is wrong? Originally I've learned that the solution of a systems of coupled ODE:
$$\underbrace{\left[\begin{array}{cc}{y_1}'(x)\\ \vdots \\{y_n}'(x)\end{array}\right]}_{y'(x)}= 
\underbrace{\left[\begin{array}{cccc}&a_{1\,1} &\cdots &a_{1\,n}
\\ &\vdots \quad &&\vdots \\
&a_{n\,1}&\cdots&a_{n\,n}\end{array}\right]}_{A}\,
\underbrace{\left[\begin{array}{cc}{y_1}(x)\\ \vdots \\{y_n}(x)\end{array}\right]}_{y(x)}$$
is determined by: $$y(x) = \exp(A\,x)\,C$$ where $C$ is a vector with constants $\left[\begin{array}{cc}C_1\\ \vdots \\C_n\end{array}\right]$ and $\exp(A\,x)$ the matrix exponential, that can be at best calculated by: $$\exp(A\,x) = V^{-1}\,\exp(\Lambda\,x)\,V$$ where $V$ is a vector full of Eigenvectors: $\left[\begin{array}{cc}v_1&\cdots&v_n\end{array}\right]$
and $\Lambda$ a matrix full of Eigenvalues on its main diagonal: $\left[\begin{array}{ccc}\lambda_1&\\ &\ddots\\&&v_n\end{array}\right]$
Now apparently this leads to another solution compared to: $$y(x) = c_1\,v_1\,\exp(\lambda_1\,x)+\cdots+c_n\,v_n\,\exp(\lambda_n\,x)$$
Even if one told me both solutions were to solve a system of ODE

For example consider the system:
$$\left(\begin{array}{cc}{y_1}'(x) \\ {y_2}'(x)\end{array}\right) = \left(\begin{array}{cc} 4 & 10\\ 8 & 2 \end{array}\right)\,\left(\begin{array}{cc}{y_1}(x) \\ {y_2}(x)\end{array}\right)$$
with Eigenvalues $\lambda_1 = 12, \lambda_2 = -6$ and Eigenvectors: $v_1 = \left(\begin{array}{cc}1 \\ 8/10\end{array}\right), v_2 = \left(\begin{array}{cc}1 \\ -1\end{array}\right)$
According to the second plain solution process I'd obtain:
$$\left(\begin{array}{cc}{y_1}(x) \\ {y_2}(x)\end{array}\right) = \left(\begin{array}{cc}1 \\ 8/10\end{array}\right)\,\exp(12\,x)+\left(\begin{array}{cc}1 \\ -1\end{array}\right)\,\exp(-6\,x)$$
However the matrix exponential spits:
$$\left(\begin{array}{cc}{y_1}(x) \\ {y_2}(x)\end{array}\right) = C\,\left(\begin{array}{cc} \frac{4\,{\mathrm{e}}^{-6\,x}}{9}+\frac{5\,{\mathrm{e}}^{12\,x}}{9} & \frac{5\,{\mathrm{e}}^{12\,x}}{9}-\frac{5\,{\mathrm{e}}^{-6\,x}}{9}\\ \frac{4\,{\mathrm{e}}^{12\,x}}{9}-\frac{4\,{\mathrm{e}}^{-6\,x}}{9} & \frac{5\,{\mathrm{e}}^{-6\,x}}{9}+\frac{4\,{\mathrm{e}}^{12\,x}}{9} \end{array}\right)\,$$
Probably those two are inconvenient, because the constants are set differently. In fact the second approach is independent of constants somehow. So how's that all in relation with each other?
 [/INST] We have
$$\left(\begin{array}{cc}{y_1}'(x) \\ {y_2}'(x)\end{array}\right) = \left(\begin{array}{cc} 4 & 10\\ 8 & 2 \end{array}\right)\,\left(\begin{array}{cc}{y_1}(x) \\ {y_2}(x)\end{array}\right)$$
The eigenvalues are
$$\lambda_1 = 12, ~~\lambda_2 = -6$$
The eigenvectors are
$$v_1 = \begin{pmatrix} 5 \\ 4 \end{pmatrix}, ~~v_2 = \begin{pmatrix} -1 \\ 1 \end{pmatrix}$$
The solution can written as
$$y(x) = c_1 e^{\lambda_1 x} v_1 + c_2 e^{\lambda_2 x} v_2 = c_1 e^{12 x}\begin{pmatrix} 5 \\ 4 \end{pmatrix} + c_2 e^{-6x}\begin{pmatrix} -1 \\ 1 \end{pmatrix}$$
We can also use the matrix exponential
$$e^{A x} = P e^{Dx} P^{-1} = \begin{pmatrix} 5 & -1 \\ 4 & 1 \end{pmatrix}\begin{pmatrix} e^{12x} &0 \\ 0 & e^{-6x} \end{pmatrix}
\begin{pmatrix}
 \dfrac{1}{9} & \dfrac{1}{9} \\
 -\dfrac{4}{9} & \dfrac{5}{9} \\
\end{pmatrix} = \begin{pmatrix}
 \dfrac{4 e^{-6 x}}{9}+\dfrac{5 e^{12 x}}{9} & \dfrac{-5}{9} e^{-6 x}+\dfrac{5 e^{12 x}}{9} \\
 \dfrac{-4}{9} e^{-6 x}+\dfrac{4 e^{12 x}}{9} & \dfrac{5 e^{-6 x}}{9}+\dfrac{4 e^{12 x}}{9} \\
\end{pmatrix}$$
The solution using the matrix exponential is given by
$$y(x) = e^{Ax} c = \left(
\begin{array}{c}
 c_1 \left(\dfrac{4 e^{-6 x}}{9}+\dfrac{5 e^{12 x}}{9}\right)+c_2 \left(\dfrac{-5}{9}e^{-6 x}+\dfrac{5 e^{12 x}}{9}\right) \\
 c_1 \left(\dfrac{-4}{9} e^{-6 x}+\dfrac{4 e^{12 x}}{9}\right)+c_2 \left(\dfrac{5 e^{-6 x}}{9}+\dfrac{4 e^{12 x}}{9}\right) \\
\end{array}
\right)$$
Compare the two results while noting that you can combine constants because they are arbitrary.
Also, if you choose an initial condition, both methods produce exactly the same result.
</s>