Let $f = 3x^3+2x^2+2x+3$, factorize $f$ as product of irreducible factors in $\mathbb Z_5$.
First thing I've used the polynomial reminder theorem so to make the first factorization:
$\begin{aligned} f = 3x^3+2x^2+2x+3 = (3x^2-x+3)(x+1)\end{aligned}$
Obviously then as second step I've taken care of that quadratic polynomial, so:
$x_1,x_2=\frac{-b\pm\sqrt{\Delta}}{2a}=\frac{1\pm\sqrt{1-4(9)}}{6}=\frac{1\pm\sqrt{-35}}{6}$
my question is as I've done calculations in $\mathbb Z_5$, was I allowed to do that:
as $-35 \equiv_5 100 \Rightarrow \sqrt{\Delta}=\sqrt{-35} = \sqrt{100}$
then $x_1= \frac{11}{6} = 1 \text { (mod 5)}$, $x_2= -\frac{3}{2} = 1 \text { (mod 5)}$,
therefore my resulting product would be $f = (x+1)(x+1)(x+1)$.
I think I have done something illegal, that is why multiplying back $(x+1)(x+1)$ I get $x^2+2x+1 \neq 3x^2-x+3$.
Any ideas on how can I get to the right result?