Factor $x^3-x^2+2$ in $\mathbb Z_{3}[x]$ and explain why the factors are irreducible.
So the factor is supposed to be:
$x^3-x^2+2 = 2(x + 1)(2x^2 + 2x + 1)= (x + 1)(x^2 + x + 2)$.
But I don't really see how. What I see:
$x^3-x^2+2 \equiv x^3+2x^2+2$ in $\mathbb Z_{3}[x]$.
And I suppose it can factor to $x^2(x+2)+2$ ? I don't see where $2(x + 1)(2x^2 + 2x + 1)$ comes from.
Factoring means: Write your polynomial as a product of irreducible ones. $x^2(x+2) + 2$ is no factorisation. To find the linear factors of a polynomial, first find it's roots. So we plug in $0$, $1$ and $2$ into $p(x) = x^3 - x^2 + 2$, and get \begin{align*} p(0) &= 2\\ p(1) &= 2\\ p(2) &= 8 - 4 + 2 = 6 \equiv 0 \end{align*} So $2 \in \mathbb Z_3$ is a root. That means that $p$ has a factor $(X - 2) = (X+1) \in \mathbb Z_3[X]$, polynomial long division gives \[ X^3 - X^2 + 2 = (X+1) \cdot (X^2 + X + 2) \] as $q(X)= X^2 + X + 2$ has no zeros in $\mathbb Z_3$, it is (as a polynomial of degree two) irreducible and $p(X) = (X+1)\cdot (X^2 + X + 2)$ is the factorization of $p$ into irreducible factors you aimed for.