Finding a solution basis Find a real solution basis of $$y'=\left( \begin{matrix}-1&-2&0\\0&2&0\\-1&-3&2\\ \end{matrix} \right)y.$$
The characteristic equation of this matrix is $$P(t) = (1-t)(2-t)^2.$$
So next I calculated eigenvectors for the eigenvalues $1$ and $2$, which are $$u\overset{def}=(1,0,1) \text{ and }v\overset{def}=(0,0,1) \text{ respectively}.$$
The eigenvalue $2$ has algebraic multiplicity $2$ but it only has one eigenvector. So if I'm correct we need a principal vector. I computed this and it is $$v_p\overset{def}=(2,-1,0).$$
Now the solution basis is $$B=\Big\{t\mapsto u e^t, t\mapsto ve^{2t}, ?? \Big\}.$$
My question is, what is the third function? What solution does the principal vector I have computed correspond to?
Thank you.
 A: If the constant matrix $A$ of one such homogeneous system is defective, for each eigenvalue $\lambda$ whose geometric multiplicity $m$ isn't big enough (i.e., it doesn't coincide with the algebraic multiplicity), the following functions are linearly independent solutions to the differential equation:
$$\begin{align} 
&t\mapsto e^{\lambda t}v_1\\ 
&t\mapsto e^{\lambda t}(tv_1+v_2)\\
&t\mapsto e^{\lambda t}\left(\dfrac{t^2}{2!}v_1+tv_2+v_3\right)\\
&t\mapsto e^{\lambda tv}\left(\dfrac{t^{m-1}}{(m-1)!}v_1+\ldots +tv_{m-1}+v_m\right),
\end{align}$$
where for each $i\in \{1, \ldots m\}$, $v_i$ is a generalized eigenvector which can be found iteratively by solving the system $(A-\lambda I)v_i=v_{i-1}$ for $i\ge 2$ and $v_1$ being an eigenvector.

Assuming what you did is correct, you get a third solution (which makes the set of solutions linearly independent) by considering $t\mapsto e^{2t}(tv+w)$, where $w$ is a solution to $(A-2I)x=v$. I found one such solution to be $\begin{bmatrix} \frac 2 7 \\ -\frac 3 7\\ 0\end{bmatrix}$.

As paw88789 pointed out, you have some mistakes in your solution, namely the computation of the characteristic polynomial which yields one wrong eigenvalue. Fortunately the part which pertains to your question is correct.
