Factoring $X^5 - X^4 - X^3 + X^2 + X$ into irreducible factors: Is my solution correct? I'm trying to reduce $f(x) = x^5 - x^4 - x^3 + x^2 + x$ in $F_3[X]$ in irreducible factors.
What I came up with was $(x^2 + x + 2)(x^2 - 2x + 2)(x)$
How I did it was I first found all the irreducible polynomials of degree $2$ in $F_3[X]$. Then I did long divisions on $f(x)$ with one of the polynomials I found (brute force), until found a factor. Which was $x^3 - 2x^2 + 2x$. Dividing it by $x$ gives $x^2 - 2x + 2$. And that's how I found the factors.
Is this a correct solution to the question? I'm especially having doubts about the last part of my solution where I just divide it by X. Hopefully this is okay to ask here.

Your answer is right.
I like the following way: $$x^5-x^4-x^3+x^2+x=x(x^4-x^3-x^2+x+1)=$$
$$=x(x^4+2x^3-x^2-2x+1)=x(x^2+x-1)^2.$$
