Homogeneous
Once more, let's review how we got here. We started with $\vec{v}e^{cx}$. So, our solutions will be of the form: eigenvector * $ e^{\text{eigenvalue} * x}$.
Let's find the eigenvalues of this matrix. $$\begin{vmatrix}3-\lambda & 0 & 1\\9 & -1-\lambda & 2 \\-9 & 4 & -1-\lambda \end{vmatrix} = 0$$ $$(3-\lambda)\left((\lambda + 1)^2 + 1\right) = 0$$ When $\lambda = 3$, we get $$\begin{bmatrix}0 & 0 & 1\\9 & -4 & 2 \\-9 & 4 & -4 \end{bmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} = 0\to \begin{bmatrix}0 & 0 & 1\\9 & -4 & 0 \\-9 & 4 & 0 \end{bmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} = 0 \to \begin{bmatrix}0 & 0 & 1\\9 & -4 & 0 \\0 & 0 & 0 \end{bmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} = 0 $$ $$x_3 = 0, 9x_1 = 4x_2 \to \begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} = \begin{bmatrix}x_1\\ \frac{9}{4}x_1\\0\end{bmatrix} \to C\begin{bmatrix}4\\9\\0\end{bmatrix}$$ So, that specific solution becomes $\begin{bmatrix}4\\9\\0\end{bmatrix}e^{3x}$.
Problem: Imaginary Numbers
We get this as our answer $$\begin{bmatrix}1\\2-i\\-4 + i\end{bmatrix}e^{(-1 + i)t} \to \left(\begin{bmatrix}1\\2\\-4\end{bmatrix} + i\begin{bmatrix}0\\-1\\1\end{bmatrix}\right)e^{-t}\left(\cos(t) + i\sin(t)\right)$$. $$x(t) = e^{-t}\left(\begin{bmatrix}1\\2\\-4\end{bmatrix}\cos(t) - \begin{bmatrix}0\\-1\\1\end{bmatrix}\sin(t)\right) + ie^{-t}\left(\begin{bmatrix}0\\-1\\1\end{bmatrix}\cos(t) + \begin{bmatrix}1\\2\\-4\end{bmatrix}\sin(t)\right)$$ Now, we split this into two solutions $$x_2 = e^{-t}\begin{bmatrix}\cos(t)\\2\cos(t) + \sin(t)\\-4\cos(t) - \sin(t)\end{bmatrix}, x_3 = e^{-t}\begin{bmatrix}\sin(t)\\-\cos(t) + 2\sin(t)\\ \cos(t) + 4\sin(t)\end{bmatrix}$$
Problem: Nonhomogeneous
Problem: Repeat Roots
Let's say we have:
$$\vec{x}' = \begin{bmatrix}1 & -1\\4 & -3\end{bmatrix}\vec{x}$$
The only eigenvalue is -1. The only eigenvector is $\begin{bmatrix}1\\2\end{bmatrix}$. Here we have a problem. We know one solution: $\vec{x_1} = \begin{bmatrix}1\\2\end{bmatrix}e^{-t}$. We want two equations, however. So, what can we do?
For $x_2$, we guess $c_1\left(\vec{v_1}te^{-t} + \vec{v_2}e^{-t}\right)$, where $\vec{v_1}$ is the first eigenvector. Here is the equation to get $v_2$. The proof is below. $$\left(A - (\lambda{}I)\right)\vec{v_2} = \vec{v_1} \text{ and } \left(A - (\lambda{}I)\right)\vec{v_1} = \vec{0} $$
It's not too hard, just write out $x'$ and solve. As an extension, we find that $\left(A - \lambda I\right)^2\vec{v_2} = \vec{0}$. We do that for this problem. $$\begin{bmatrix}2 & -1 \\ 4& -2\end{bmatrix}\begin{bmatrix}a\\b\end{bmatrix} = \begin{bmatrix}1\\2\end{bmatrix}$$ $$\vec{v_2} = c_1\begin{bmatrix}1\\2\end{bmatrix} + \begin{bmatrix}0\\-1\end{bmatrix}$$ The repeated $\begin{bmatrix}1\\2\end{bmatrix}$ may be absorbed. Our final solution becomes: $$c_1\begin{bmatrix}1\\2\end{bmatrix}e^{-t} + c_2\left(\begin{bmatrix}1\\2\end{bmatrix}te^{-t} + \left(c_3\begin{bmatrix}1\\2\end{bmatrix} + \begin{bmatrix}0\\-1\end{bmatrix}\right)e^{-t}\right)$$ Because we get a $(c_1 + c_2*c_3)\begin{bmatrix}1\\2\end{bmatrix}e^{-t}$. Those can be combined into one constant. Our real final answer is: $$\boxed{c_1\begin{bmatrix}1\\2\end{bmatrix}e^{-t} + c_2\left(\begin{bmatrix}1\\2\end{bmatrix}te^{-t} + \begin{bmatrix}0\\-1\end{bmatrix}e^{-t}\right)}$$
It's not too hard, just write out $x'$ and solve. As an extension, we find that $\left(A - \lambda I\right)^2\vec{v_2} = \vec{0}$. We do that for this problem. $$\begin{bmatrix}2 & -1 \\ 4& -2\end{bmatrix}\begin{bmatrix}a\\b\end{bmatrix} = \begin{bmatrix}1\\2\end{bmatrix}$$ $$\vec{v_2} = c_1\begin{bmatrix}1\\2\end{bmatrix} + \begin{bmatrix}0\\-1\end{bmatrix}$$ The repeated $\begin{bmatrix}1\\2\end{bmatrix}$ may be absorbed. Our final solution becomes: $$c_1\begin{bmatrix}1\\2\end{bmatrix}e^{-t} + c_2\left(\begin{bmatrix}1\\2\end{bmatrix}te^{-t} + \left(c_3\begin{bmatrix}1\\2\end{bmatrix} + \begin{bmatrix}0\\-1\end{bmatrix}\right)e^{-t}\right)$$ Because we get a $(c_1 + c_2*c_3)\begin{bmatrix}1\\2\end{bmatrix}e^{-t}$. Those can be combined into one constant. Our real final answer is: $$\boxed{c_1\begin{bmatrix}1\\2\end{bmatrix}e^{-t} + c_2\left(\begin{bmatrix}1\\2\end{bmatrix}te^{-t} + \begin{bmatrix}0\\-1\end{bmatrix}e^{-t}\right)}$$
David Witten