Polynomial factoring

Initial considerations

Before anything else, consider the following in this order because it can save you a lot of time and effort.

  1. Taking a common factor
  2. Factoring by grouping
  3. Factoring any form of quadratic

Refer to Basics of factoring and More on factoring.

Sum and difference of cubes

The general pattern is

\[a^3\pm b^3=(a\pm b)(a^2\mp ab+b^2)\]

The quadratic on the right-hand side is not factorable in real numbers, so do not waste time on it. An expression of sum or difference of cubes is always composed of two terms, each of which is a perfect cube. It is much easier to factor a difference of cubes (if you recognise the pattern) than to try factoring with the rational root theorem (discussed below). Consider \(x^6-1\), which can be written as \((x^2)^3-1^3\). Then it is factored as \[(x^2-1)(x^4+x^2+1)\] Sometimes factoring a polynomial this way is the only available option. Consider \(x^6-8=(x^2)^3-2^3\). This can be factored as \[(x^2-2)(x^4+2x^2+4)\] The rational root theorem fails in this case, because this polynomial does not have rational roots.

Rational root theorem

Given a polynomial in the standard form \(P(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0\), and provided the polynomial has rational roots, those rational roots must satisfy the following conditions

  • their numerator is in set \(T\), which is the set of divisors of the constant term \(a_0\); and
  • their denominator is in set \(L\), which is the set of divisors of the leading coefficient \(a_n\).

According to the factor theorem, if \(P(a)=0\), then \((x-a)\) is a factor of \(P(x)\). We either substitute with the elements of the previous sets into the polynomial or, more efficiently, use synthetic division to see if we would get zero remainder. Synthetic division is preferred because we can easily continue factoring the same way.

Consider the polynomial \(\require{cancel}6x^5-5x^4-50x^3+65x^2+20x-12\). The numbers we should try can be obtained from the following table. The red row has elements of set \(T=\{1,2,3,4,6,12\}\), and the blue column elements of set \(L=\{1,2,3,6\}\). The body of the table has the possible rational roots. When we reduce the rational numbers in the body of the table to their lowest terms, we find that the table has a lot of duplicate values, which we then exclude.

\(1\) \(2\) \(3\) \(4\) \(6\) \(12\)
\(1\) \(\frac{1}{1}=1\) \(\frac{2}{1}=2\) \(\frac{3}{1}=3\) \(\frac{4}{1}=4\) \(\frac{6}{1}=6\) \(\frac{12}{1}=12\)
\(2\) \(\frac{1}{2}\) \(\frac{2}{2}=\cancel{1}\) \(\frac{3}{2}\) \(\frac{4}{2}=\cancel{2}\) \(\frac{6}{2}=\cancel{3}\) \(\frac{12}{2}=\cancel{6}\)
\(3\) \(\frac{1}{3}\) \(\frac{2}{3}\) \(\frac{3}{3}=\cancel{1}\) \(\frac{4}{3}\) \(\frac{6}{3}=\cancel{2}\) \(\frac{12}{3}=\cancel{4}\)
\(6\) \(\frac{1}{6}\) \(\frac{2}{6}=\cancel{\frac{1}{3}}\) \(\frac{3}{6}=\cancel{\frac{1}{2}}\) \(\frac{4}{6}=\cancel{\frac{2}{3}}\) \(\frac{6}{6}=\cancel{1}\) \(\frac{12}{6}=\cancel{2}\)

The final list should contain those distinct numbers, with both a positive and a negative sign, so it becomes \[\pm1,\pm2,\pm3,\pm4,\pm6,\pm12,\pm\frac{1}{6},\pm\frac{1}{3},\pm\frac{1}{2},\pm\frac{2}{3},\pm\frac{4}{3},\pm\frac{3}{2}\]

We should try these numbers systematically, with integers before rational numbers, and from smallest to largest, not for any reason other than to avoid missing a number, and to do the easy ones first.

\(\begin{array}{r|rrrrrr} & 6 & -5 & -50 & 65 & 20 & -12 \\ 1 & & 6 & 1 & -49 & 16 & 36 \\ \hline & 6 & 1 & -49 & 16 & 36 & 24 \end{array}\)

Because the remainder is not zero, we know that \((x-1)\) is not a factor of the polynomial, and we do not need to test this as a factor again. We try the next value, which is \(-1\).

\(\begin{array}{r|rrrrrr} & 6 & -5 & -50 & 65 & 20 & -12 \\ -1 & & -6 & 11 & 39 & -104 & 84 \\ \hline & 6 & -11 & -39 & 104 & -84 & 72 \end{array}\)

This shows that \((x+1)\) is not a factor, and we do not need to test it again. We move on to \(2\).

\(\begin{array}{r|rrrrrr} & 6 & -5 & -50 & 65 & 20 & -12 \\ 2 & & 12 & 14 & -72 & -14 & 12 \\ \hline & 6 & 7 & -36 & -7 & 6 & 0 \end{array}\)

This shows that \((x-2)\) is a factor and the polynomial can be written as \((x-2)(6x^4+7x^3-36x^2-7x+6)\). We note that the constant term in the quotient is now \(6\) rather than \(12\), which means we can reduce the list of numbers we will be testing to remove \(\pm1\) (because it has failed); and everything in the columns of \(4\) and \(12\) (because they are not divisors of \(6\)). So \(\pm4,\pm12\) and \(\frac{4}{3}\) is excluded. The list is now \[\pm2,\pm3,\pm6,\pm\frac{1}{6},\pm\frac{1}{3},\pm\frac{1}{2},\pm\frac{2}{3},\pm\frac{3}{2}\]

Since \(2\) did not fail, we may try it again, since the polynomial may have a double root there.

\(\begin{array}{r|rrrrrr} & 6 & 7 & -36 & -7 & 6 \\ 2 & & 12 & 38 & 4 & -6 \\ \hline & 6 & 19 & 2 & -3 & 0 \end{array}\)

This shows that there is another root at \((x-2)\), and now the polynomial is equivalent to \((x-2)^2(6x^3+19x^2+2x-3)\). The constant term got reduced to \(3\), which has the set of divisors \(\{1,3\}\). Therefore, we can drop everything in the columns of \(2\) and \(6\) in the table above, which means we drop \(2, 6\), and \(\frac{2}{3}\). The list now becomes \[\pm3,\pm\frac{1}{6},\pm\frac{1}{3},\pm\frac{1}{2},\pm\frac{3}{2}\]

The next number to try would be \(3\).

\(\begin{array}{r|rrrrrr} & 6 & 19 & 2 & -3 \\ 3 & & 18 & 111 & 339 \\ \hline & 6 & 37 & 113 & 336 \end{array}\)

This shows that \((x-3)\) is not a factor, so we do not need to test it again. We move on to \(-3\).

\(\begin{array}{r|rrrrrr} & 6 & 19 & 2 & -3 \\ -3 & & -18 & -3 & 3 \\ \hline & 6 & 1 & -1 & 0 \end{array}\)

Therefore, \((x+3)\) is a factor, and the polynomial is equivalent to \((x-2)^2(x+3)(6x^2+x-1)\). Since the remaining expression is a quadratic, we can factor is as such without the need for repeating the process again. The final factored form then beccomes \[(x-2)^2(x+3)(3x-1)(2x+1)\]