# How to find root of Polynomials?

I'm studing polynomials; I have this exercise:

Find the irreducible factors of the polynomial $x^4-2x^2-3 \in \mathbb{Z}_5[x]$

I think in this way: I need to find root of the polynomial. A root of polynomial is a number such that the polynomials application $f(x) = x^4-2x^2-3=0$ that means $x^4-2x^2-3 \equiv 0 \pmod 5$, so $5|x^4-2x^2-3$. The only $x$ that makes this possible is $x=2$ (in fact $5|5$) and $x=3$ (in fact $5|60$). I know that this is a correct way, but how can I find roots if I'm in $\mathbb{Z}_{430}$, obviously I can't try this 430 times. Again: what if I'm in $\mathbb{R}[x]$?

Anyway, the next step is to divide the polynomial by $x-i$ where $i$ are my roots. So

$$\frac{x^4-2x^2-3}{x-2}= x^3+2x^2+2x+4$$ $$\frac{x^3+2x^2+2x+4}{x-3} = x^2+2$$

Since $x^2+2$ is irreducible, the factorization is $(x-2)(x-3)(x^2+2)$ is right?

-
Note that by setting $z = x^2$, you can simplify this to $z^2 - 2z - 3$. Since $2 \nmid p$, you can then apply the binominal formulas to bring this equation into the form $(z+a)^2 = b$ and solve this by finding a square root of $b$ in $\mathbb Z_p$. In a second step, solve $x^2 = z$ for the values of $z$ you find. This approach works for this special formula over all fields with characteristic $\neq 2$, and with small adaptations even in that case. –  Johannes Kloos Mar 20 '12 at 14:06
The high school factorization $(x^2-3)(x^2+1)$ is universal. Further factorization is field-dependent. –  André Nicolas Mar 20 '12 at 14:36

Hint $\$ Over a domain, $\rm\: x^2 - (n-1)\:x - n\:$ has roots $\rm\:a,b\iff ab\: =\: -n,\:\ a+b\: =\: n-1.\:$ Alternatively grouping $\rm\ x\:(x-n)\: +\: x-n\:$ makes the factorization clear.
To find the solutions over $\rm\:\mathbb Z/m\:$ use the Chinese Remainder Theorem (CRT) to combine the solutions from $\rm\:\mathbb Z/p^k\:$ for all primes $\rm\:p\ |\ m,\:$ noting that for all odd primes $\rm\:p\:$ we have $\rm\: p^k\ |\ (x^2-n)(x^2+1)\iff p^k\ |\ x^2-n\:$ or $\rm\: p^k\ |\ x^2\!+1,\:$ since if $\rm\:p\:$ divides both factors then it also divides their difference $\rm\:x^2+1-(x^2-n) = n+1 = 2^J,\:$ contra $\rm\:p\:$ odd.