Consider the matrix $$\begin{bmatrix}2&1&0\\1&1&0\\0&0&1\end{bmatrix}$$
The characteristic polynomial is of the form $$(1-\lambda)^2(2-\lambda)-1 = 0.$$ Expanding this out, we get $$\lambda^3 - 4\lambda^2 +5 \lambda -1 = 0.$$ How would I go about solving for $\lambda$ in this case? Do I have to do long division to find a factor? If that's the case, do I just guess and check factors until I get a nice division with no remainder?
Thanks.
The characteristic polynomial is not $(1-\lambda)^2(2-\lambda)-1$, it is $$(1-\lambda)^2(2-\lambda)-(1-\lambda),$$ from which it is immediate that $\lambda=1$ is an eigenvalue.
In general, when you are asked to compute eigenvalues of a matrix as an exercise, the divisors of the constant coefficient are good candidates. In this case these are just $1$ and $-1$.