# Factorize $f$ as product of irreducible factors in $\mathbb Z_5$

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?

-
You had it all fine! Your only mistake is that $$35=0\pmod 5\Longrightarrow \sqrt{-35}=0\pmod 5\,\,\,and\,\,\,\frac{1}{6}=6^{-1}=1^{-1}=1\pmod 5$$so the quadratic is actually $$3(x-1)^2$$with a double root, of course. – DonAntonio Jul 15 '12 at 11:54

If $f(X) = aX^2 + bX + c$ is a quadratic polynomial with roots $x_1$ and $x_2$ then $f(X) = a(X-x_1)(X-x_2)$ (the factor $a$ is necessary to get the right leading coefficient). You found that $3x^2-x+3$ has a double root at $x_1 = x_2 = 1$, so $3x^2-x+3 = 3(x-1)^2$. Your mistakes were
1. You forgot to multiply by the leading coefficient $3$.
2. You concluded that a root in $1$ corresponds to the linear factor $(x+1)$, but this would mean a root in $-1$. The right linear factor is $(x-1)$.
When you said: "You forgot to multiply by the leading coefficient 3." did you mean I have to multiply the leading coefficient by 2 so that my equation results in $6x^2+x+6 \Rightarrow x^2+x+1$? – haunted85 Jul 15 '12 at 10:30
No, I meant that from the fact that $3x^2-x+3$ has roots $x_1=x_2=1$ you can conclude $3x^2-x+3 = 3(x-1)^2$ where the product of linear factors $(x-1)^2$ had to be multiplied by the leading coefficient $3$ in order to match the left side. – marlu Jul 15 '12 at 10:35
So basically everytime my leading coefficient $ax^n : a \neq 1$ then I have to remember that in order for the equations to match I need to multiply my reduced factors by $a$. Is that right? – haunted85 Jul 15 '12 at 10:39