# Factor a cubic polynomial

Is there a simple way to find out that, for example, $u^3 - 54u + 108$ is $(u - 6)(u^2 + 6u - 18)$?

• The Rational Roots test tells us any linear factor $au+b$ will have $a$ that divides the leading coefficient (here monic, so $a=1$ without loss of generality) and $b$ dividing the constant term $108$. So there are not a vast number of possibilities to check. Commented Jul 5, 2015 at 1:21

By the rational root theorem, if $u^3-54u+108$ has an integer root $r$, then $r$ must be an integer factor of $108$. So in the worst case, you could try the possibilities $1,2,3,4,6,9,12,18,27,36,54,108$ as well as their negatives and then use polynomial long division when and if you find a root.

• ... and also the negatives of all of those. Commented Jul 5, 2015 at 1:48

Lucky that there is a general solution for every cubic:

http://www.sosmath.com/algebra/factor/fac11/fac11.html

Though there is no formulas for EDIT quintics or higher.

• Ah, yes, let me edit. Commented Jul 5, 2015 at 1:50

There is a simple and fast way to locate the root at $u = 6$ using the Rational Roots theorem. In bburGsamohT's answer the root candidates are given. If we try the first positive one, we see that it is not a root because the value of the polynomial is 55 which is not equal to 0. Computing this value looks like a waste of effort, but it turns out that we can make good use of this number 55.

If we put $u = y + 1$ in the polynomial then we get a third degree polynomial in $y$, which is then also a monic polynomial (i.e. the coefficient of the highest power of y equals 1), while the constant term, being the value it takes for $y = 0$ which corresponds to $u = 1$, is that number 55. So, without doing any more work to expand the polynomial on powers of $y$, we can already apply the rational roots theorem to it based on what we already know about it. The possible roots of the polynomial are the factors of 55:

$$y = \pm1, \pm5, \pm11$$

Therefore the possible roots of the original polynomial in terms of $u$ are given by:

$$u = y+1 =-10,-4,0,2,6,12$$

But any possible root must also appear on bburGsamohT's list, which means that we're left with:

$$u = -4,2,6,12$$

If we again take the first positive candidate, which is now $u = 2$, we find that the value of the polynomial is 8. Putting $u = y + 2$ then yields the possible roots of:

$$y = \pm1,\pm2,\pm4,\pm8$$

Therefore:

$$u = -6,-2,0,1,3,4,6,10$$

But any root must also appear on the list we compiled above, so we need to take the intersection of both lists to find all the viable root candidates. We then see that only $u = 6$ can be a rational root. So, only 2 trials were needed to find the rational root.