# Exercise on irreducible polynomials

I know that this is not the right place for questions like that, but I need someone that explain me step-by-step how can I resolve this exercise (I've exam in the next days):

Write as products of irreducible factors the polynomial $f=x^3-3x^2+x-3 \in\mathbb{R}[x]$ and $f=x^3-\overline{3}x^2+x-\overline{3} \in\mathbb{Z}_5[x]$.

Thank you for helping.

-
Use factor by grouping on each one, and notice that while $x^2+1$ doesn't factor in $\mathbb{R}$, it does factor in $\mathbb{Z}_5$. – Andrew Parker Mar 19 '12 at 23:10
Some answers are mentioning the rational root test, but I would advise you generally use that after you have tried grouping. If a polynomial has $k$ terms, and $d$ is a divisor of $k$, then I would try grouping $d$ terms at a time and see if a common polynomial falls out. In this case, $k=4$, and there was only one choice for $d$: $d=2$. For one thing, this is easier to do - there are fewer cases to check. For another, sometimes this yields a factorization when there is no root. – alex.jordan Mar 19 '12 at 23:20

This polynomial factors, and that can be seen using the grouping method. If your polynomial has four terms like this one, the grouping method might work. You group terms together two at a time and factor out a Greatest Common Factor:

\begin{align*} x^3-3x^2+x -3 & = x^2(x-3)+1(x -3)\\ & = (x^2+1)(x-3) \end{align*}

And voila, the polynomial is at least partially factored. Over $\mathbb{R}$, we cannot factor further, since $-1$ has no square root.

Next, now that we have exhausted factoring over $\mathbb{R}$, maybe factoring can continue over $\mathbb{F}_5$. Indeed, here we have \begin{align*} x^3-3x^2+x -3 & = x^2(x-3)+1(x -3)\\ & = (x^2+1)(x-3)\\ & = (x^2-4)(x-3)\\ & = (x-2)(x+2)(x-3) \end{align*}

Lastly, it's nice to choose residues from the same neighborhood, so \begin{align*} x^3-3x^2+x -3 & = x^2(x-3)+1(x -3)\\ & = (x^2+1)(x-3)\\ & = (x^2-4)(x-3)\\ & = (x-2)(x+2)(x-3)\\ & = (x-2)(x-3)(x-3)\\ & = (x-2)(x-3)^2 \end{align*}

-

I'll write down the exact things I'm doing, but to follow you should pull out a sheet of paper and do the work itself.

If you know the rational root test, then you should use the rational root test first. Checking quickly through $\pm 1, \pm 3$ we see that $3$ is a factor. Carry out the division by $x-3$ and we are left with a quadratic.

Using the quadratic formula, we see that there are no more real roots. So the polynomial factors as $(x-3)(x-i)(x+i)$ over $\mathbb{C}$, or $(x-3)(x^2 + 1)$ over $\mathbb{R}$.

For the second, we of course actually have the same polynomial and so we already know $3$ is a root. So we are really interested in factoring $x^2 + 1$ over the integers mod $5$. (I will omit the $\bar{n}$ bar notation - we know what we mean here).

There are only $5$ possibilities. So we check them. $1^2 + 1 = 2$, $2^2 + 1 = 5 = 0$, $3^2 + 1 = 10 = 0$ (and we could go on, but we don't need to). So this polynomial is $(x-2)(x-3)^2$

-
Ohhh, straight up factoring. That's much better than my first solution. alex.jordan wins that one. – mixedmath Mar 19 '12 at 23:12

$\bf Hint:$ By the rational root test, the possible rational solutions are $\pm 1, \pm 3$ by inspection we see that $3$ is a root of your polynomial. Then you can factorize by $(x-3)$ and use the quadratic formula to finish the factorization.

-