How do I solve this system of linear differential equations efficiently?

\begin{aligned} y_1' &= -y_1 - 4y_2 + 2y_3 \\ y_2' &= 2y_1 + 5y_2 - y_3 \\ y_3' &= 2y_1 + 2y_2 + 2y_3 \end{aligned}

I get the eigenvalues $$\lambda=1,2,3$$ and for the first two I get the eigenvector $$\mathbf{0}$$. For the last, I get two redundant rows that I'm not sure how to handle.

A similar thing happens when I'm solving single equations and I have to use the approach that $$y=u(x)e^{\lambda t}$$ so I guess something similar happens here, but I'm just not sure how that looks on paper.

I've tried another approach where I recombine the system into the DE $$y'''=3y+2y'+2y''$$ but then my solution heads in a different direction in terms of sin and cos.

There's fundamental understanding missing here (or sloppy work). How do I approach this?

EDIT: one of my signs was wrong in the last equation. Fixed now.

• Please check again the equations and your matrices that all coefficients and signs thereof are the same in every instance. Trying some variants, while 3 as eigenvalue seems rather certain, I do not get $1,2$, or even that both of the other eigenvalues are positive. Sep 15, 2021 at 19:00
• $0$ is, by definition, not an eigenvector. Are you lacking dimensions somewhere? Perhaps the geometric multiplicity of an eigenvalue is less than its algebraic multiplicity, giving you a degenerate system? Sep 15, 2021 at 19:13
• The Eigensystem command in Mathematica yields different eigenvalues. Maybe you should double-check your algebra? Sep 15, 2021 at 19:15
• Ok, will do. It's one of those fuzzy-headed days so I'm sure it's user error. Just needed to ask out loud as a sanity check. Sep 15, 2021 at 20:02
• Ok, for the current sign pattern you get eigenvalues $0,3,3$, not $1,2,3$. Check your calculations again. Sep 17, 2021 at 5:34

Define the vector

$$x = \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix}$$

then

$$x' = A x \hspace{24pt} (1)$$

Now you have to find the eigenvalues and eigenvectors of $$A$$. Then you can write

$$A = P D P^{-1} \hspace{24pt} (2)$$

where $$D$$ is a diagonal matrix whose diagonal elements are the eigenvalues, and the columns of $$P$$ are the eigenvectors in respective order.

Plug in equation $$(2)$$ into equation $$(1)$$:

$$x' = P D P^{-1 } x \hspace{24pt} (3)$$

so that,

$$P^{-1} x' = D P^{-1} x \hspace{24pt} (4)$$

Define the vector

$$y = P^{-1} x \hspace{24pt} (5)$$

And this in equation $$(4)$$ to obtain:

$$y' = D y \hspace{24pt} (6)$$

The solution of $$(6)$$ is

$$y(t) = e^{Dt} y(0) \hspace{24pt} (7)$$

The matrix $$e^{Dt}$$ is easily computable because $$D$$ is a diagonal matrix.

Finally, plug in $$(5)$$ into $$(7)$$:

$$x(t) = P e^{Dt} P^{-1} x(0) \hspace{24pt} (8)$$

The eigenvalues you get by solving: \begin{align*} \det(A-\lambda I)&=0\\ \left|\begin{matrix} -1-\lambda &-4 &2\\ 2 &5-\lambda &-1\\ 2 &2 &-2-\lambda \end{matrix}\right|&=0\\ (-1-\lambda)[(5-\lambda)(-2-\lambda)+2]+4[2(-2-\lambda)+2]+2[4-2(5-\lambda)]&=0\\ -\lambda^3+2\lambda^2+7\lambda-12&=0\\ 3,\frac{-1\pm\sqrt{17}}{2}&=\lambda. \end{align*} As the eigenvalues are all distinct, the matrix is diagonalizable, and you should be able to proceed from here: get your diagonal matrix set up, and you can write the solution in terms of that. That is, once you can write $$A=PDP^{-1},$$ where $$D$$ is diagonal (and just equal to the eigenvalues on the main diagonal, whereas $$P$$ equals your eigenvectors lined up), then \begin{align*} \dot{\mathbf{y}}(t)&=A\mathbf{y}(t)\\ \mathbf{y}(t)&=e^{At}\,\mathbf{y}(0)\\ \mathbf{y}(t)&=e^{PDP^{-1}t}\,\mathbf{y}(0)\\ \mathbf{y}(t)&=Pe^{Dt}P^{-1}\,\mathbf{y}(0). \end{align*}