The rational root theorem
A polynomial with integer coefficients has a root somewhere. Before you start guessing, can you know which fractions are even possible?
Where you are 3 in Remainder and factor theorems
Why this exists
The The remainder and factor theorems turns one root of a polynomial into a factor and lowers the degree by one. But it needs a first root, and a guess could be any number at all. For a polynomial with integer coefficients, the rational root theorem shrinks “any number” to a short, finite list read off the first and last coefficients. Test the list with Synthetic division, split off each root you find, and most cubics and quartics met by hand come apart completely.
This lesson runs over two days. Day 1 is the theorem, why it is true, and listing and testing candidates (Examples 1 to 3). Day 2 is solving cubics and quartics completely, and where the theorem stops (Examples 4 to 7).
Definition
A rational number is a fraction \displaystyle \frac{p}{q} of integers with q \neq 0. It is in lowest terms when p and q share no factor except 1 and -1; we also take q > 0.
A polynomial of degree n is written
with a_n \neq 0. Here a_n is the leading coefficient and a_0 the constant term. A rational root of f is a rational number r with f(r) = 0.
An integer p divides an integer a, written p \mid a, when a = pk for some integer k. The divisors of 6 are \pm 1, \pm 2, \pm 3, \pm 6: the list from Factors and multiples, with both signs.
A candidate is a fraction \displaystyle \frac{p}{q} with p \mid a_0 and q \mid a_n, q > 0.
Intuition
Build a polynomial from roots you choose: 3, \displaystyle \frac{1}{2} and -1. By the factor theorem it has the factors x - 3, \displaystyle x - \frac{1}{2} and x + 1. Write 2x - 1 in place of \displaystyle x - \frac{1}{2} to clear the fraction; a constant multiple changes no roots. Then
The leading coefficient comes only from multiplying the x terms, 1 \cdot 2 \cdot 1 = 2: it is the product of the denominators. The constant term comes only from multiplying the number terms, (-3)(-1)(1) = 3: up to sign, the product of the numerators. So every numerator of a root divides 3, and every denominator divides 2.
Run this backwards and you have the theorem. Read 3 and 2 off the polynomial, and its rational roots can only be among \pm 1, \pm 3, \displaystyle \pm \frac{1}{2}, \displaystyle \pm \frac{3}{2}: eight numbers to test instead of every number there is. The proof below shows the same holds even when a polynomial does not split into linear factors with integer coefficients.
Results
The rational root theorem. Let f(x) = a_n x^n + \dots + a_1 x + a_0 have integer coefficients, with a_n \neq 0 and a_0 \neq 0. If \displaystyle \frac{p}{q}, in lowest terms, is a root of f, then p \mid a_0 and q \mid a_n.
Testing a candidate. By the The remainder and factor theorems, c is a root exactly when f(c) = 0, and then f(x) = (x - c)\,g(x) with g of degree n - 1. Synthetic division by c gives both at once: the last entry of the bottom row is f(c), the others are the coefficients of g. Every remaining root of f is a root of g, so the search continues on g, whose list is often shorter.
Two quick values. f(1) is the sum of the coefficients. f(-1) is the same sum with the signs of the odd-power coefficients switched.
A sign change traps a root. The graph of a polynomial has no breaks, so if f(a) and f(b) have opposite signs, the graph must cross the x-axis on the way, and f has a root strictly between a and b. This is the intermediate value theorem, used here for polynomials only and without proof. Only the candidates in that gap need testing.
Why it is true
Suppose \displaystyle \frac{p}{q}, in lowest terms, is a root. Then
Multiply every term by q^n to clear the denominators:
Every term except the last has a factor p. Move the last term across and take p out:
The coefficients are integers, so the bracket is an integer, and p \mid a_0 q^n. The prime factors of a_0 q^n are those of a_0 together with those of q^n, and the primes of q^n are the primes of q. Since p and q share no prime, every prime of p, repeats included, must come from a_0. So p \mid a_0.
In the same way every term except the first has a factor q:
so q \mid a_n p^n, and since q shares no prime with p^n, q \mid a_n.
Integer coefficients make the brackets integers, and lowest terms makes the last step of each half work. Those are the two hypotheses, and both are used.
Worked examples
Examples 1 to 3 go with Day 1. Examples 4 to 7 go with Day 2.
Day 1: listing and testing
Find the rational roots of f(x) = 3x^3 + 4x^2 - 5x - 2, then factor f(x).
SolutionThe coefficients are integers. The constant term -2 gives p = \pm 1, \pm 2, and the leading coefficient 3 gives q = 1, 3 (the sign is already carried by p). The candidates are
The coefficients add to 3 + 4 - 5 - 2 = 0, so f(1) = 0 and 1 is a root. Synthetic division by 1 on 3, 4, -5, -2 gives the bottom row 3, 7, 2, 0, so
The rational roots are 1, \displaystyle -\frac{1}{3} and -2, all on the list, as the theorem promised.
Day 1: a graph cuts the list
Find the roots of f(x) = 6x^3 - 11x^2 - 3x + 2.
SolutionWith p \mid 2 and q \mid 6, every quotient with both signs, repeats such as \displaystyle \frac{2}{2} dropped, gives twelve candidates:
Rather than test all twelve, find where the roots are. A few values:
| x | -1 | 0 | 1 | 2 |
|---|---|---|---|---|
| f(x) | -12 | 2 | -6 | 0 |
So 2 is a root, and the sign changes trap one root between -1 and 0 and another between 0 and 1. The graph shows those two crossings near \displaystyle -\frac{1}{2} and \displaystyle \frac{1}{3}.
Split off 2: synthetic division by 2 on 6, -11, -3, 2 gives 6, 1, -1, 0, so
The roots are 2, \displaystyle \frac{1}{3} and \displaystyle -\frac{1}{2}. Once one root is out, the quotient is a quadratic and the rest of the list is not needed.
Day 1: a clay planter
Desmonda presses a clay planter in a box-shaped mold. Inside it is x decimeters wide, x + 2 long and 2x - 1 deep, and it must hold 45 liters, which is 45 cubic decimeters. Find x.
SolutionVolume is width times length times depth, so x(x + 2)(2x - 1) = 45. Since (x^2 + 2x)(2x - 1) = 2x^3 + 3x^2 - 2x, this is
Here p \mid 45 and q \mid 2. A width is positive, so only positive candidates count: 1, 3, 5, 9, 15, 45, \displaystyle \frac{1}{2}, \displaystyle \frac{3}{2}, \displaystyle \frac{5}{2}, \displaystyle \frac{9}{2}, \displaystyle \frac{15}{2}, \displaystyle \frac{45}{2}.
Call the left side f(x). Then f(2) = 16 + 12 - 4 - 45 = -21 and f(3) = 54 + 27 - 6 - 45 = 30, so a root lies between 2 and 3, and the only candidate there is \displaystyle \frac{5}{2}. Synthetic division by \displaystyle \frac{5}{2} on 2, 3, -2, -45 gives 2, 8, 18, 0, so it is a root and
The quadratic has discriminant 64 - 144 = -80, which is negative, so there is no other real solution. The planter is 2.5 dm wide, 4.5 dm long and 4 dm deep. Check: 2.5 \times 4.5 \times 4 = 45.
Day 2: a quartic down to a quadratic
Solve 3x^4 - x^3 - 18x^2 - 6x + 4 = 0.
SolutionCall the left side f(x). With p \mid 4 and q \mid 3 the candidates are \pm 1, \pm 2, \pm 4, \displaystyle \pm \frac{1}{3}, \displaystyle \pm \frac{2}{3}, \displaystyle \pm \frac{4}{3}.
The quick values are f(1) = 3 - 1 - 18 - 6 + 4 = -18 and f(-1) = 3 + 1 - 18 + 6 + 4 = -4, so neither is a root. Try -2: synthetic division on 3, -1, -18, -6, 4 gives 3, -7, -4, 2, 0. So
Search the cubic g(x) = 3x^3 - 7x^2 - 4x + 2 now. Its constant term is 2, so \pm 4 and \displaystyle \pm \frac{4}{3} drop off the list. Since g(0) = 2 and g(1) = -6, a root lies between 0 and 1, where the candidates are \displaystyle \frac{1}{3} and \displaystyle \frac{2}{3}. Synthetic division of 3, -7, -4, 2 by \displaystyle \frac{1}{3} gives 3, -6, -6, 0, so
The last factor is 3(x^2 - 2x - 2), which does not factor over the integers, so finish with the quadratic formula:
The roots are -2, \displaystyle \frac{1}{3}, \displaystyle 1 + \sqrt{3} and \displaystyle 1 - \sqrt{3}. The last two are irrational, so no candidate could have found them; the theorem’s work was done once a quadratic was left.
Day 2: fractions cleared first
Solve \displaystyle \frac{2}{3}x^3 - \frac{2}{3}x^2 - \frac{3}{2}x + \frac{1}{3} = 0.
SolutionThe theorem needs integer coefficients, so multiply both sides by 6, the lowest common denominator. Multiplying an equation by a nonzero number does not change its solutions:
The candidates are \pm 1, \pm 2, \displaystyle \pm \frac{1}{2}, \displaystyle \pm \frac{1}{4}. With f(x) the new left side, f(1) = -7 and f(-1) = 3, but f(2) = 32 - 16 - 18 + 2 = 0. Synthetic division by 2 on 4, -4, -9, 2 gives 4, 4, -1, 0, so the equation is (x - 2)(4x^2 + 4x - 1) = 0, and
The solutions are 2 and \displaystyle \frac{-1 \pm \sqrt{2}}{2}.
Day 2: no rational root at all
Show that f(x) = x^3 - 4x + 2 has no rational root, and say what can be said about its real roots.
SolutionHere a_n = 1 and a_0 = 2, so the only candidates are \pm 1 and \pm 2. Test all four: f(1) = -1, f(-1) = 5, f(2) = 2 and f(-2) = 2. None is 0, so by the theorem f has no rational root. That is not the same as no root. Since f(-3) = -13, f(-2) = 2, f(0) = 2, f(1) = -1 and f(2) = 2, the sign changes give real roots between -3 and -2, between 0 and 1, and between 1 and 2. A cubic has at most three roots, so these are all of them, and every one is irrational.
So x^3 - 4x + 2 cannot be split into two polynomials of lower degree with integer coefficients either: degrees add, so any such factoring of a cubic has a linear factor qx - p, and that would give a rational root \displaystyle \frac{p}{q}.
Day 2: a zero constant term, and complex roots
Solve 2x^4 - x^3 + 9x = 0.
SolutionThe constant term is 0. The theorem asks for a_0 \neq 0, and here it would only say p \mid 0, which every integer does: no list at all. So factor out x first:
That gives the root 0, and g(x) = 2x^3 - x^2 + 9 has constant term 9. With p \mid 9 and q \mid 2 the candidates are \pm 1, \pm 3, \pm 9, \displaystyle \pm \frac{1}{2}, \displaystyle \pm \frac{3}{2}, \displaystyle \pm \frac{9}{2}.
Half of them go at once. For 0 \le x \le 1, x^2 \le 1, so g(x) \ge -1 + 9 > 0; for x \ge 1, 2x^3 \ge x^2, so g(x) \ge 9. There is no positive root. Then g(-1) = 6 and g(-2) = -16 - 4 + 9 = -11, so a root lies between -2 and -1, where the only candidate is \displaystyle -\frac{3}{2}. Synthetic division of 2, -1, 0, 9 by \displaystyle -\frac{3}{2}, with 0 holding the place of the missing x term, gives 2, -4, 6, 0. So
The last factor is 2(x^2 - 2x + 3), with discriminant 4 - 12 = -8:
The roots are 0, \displaystyle -\frac{3}{2}, \displaystyle 1 + i\sqrt{2} and \displaystyle 1 - i\sqrt{2}, the last two a conjugate pair.
Boundaries
Integer coefficients. The proof needs the brackets to be integers. Fraction coefficients are cleared first (Example 5). With an irrational coefficient, as in \displaystyle \sqrt{2}\,x^2 + x - 3\sqrt{2}, “divides” has no meaning and the theorem says nothing.
Rational roots only. Irrational and complex roots never appear on the list (Examples 4, 6 and 7). Testing every candidate without success proves there is no rational root, not that there is no root.
A zero constant term. If a_0 = 0, factor out the highest power of x dividing every term, and apply the theorem to what is left (Example 7).
Lowest terms. The statement is about \displaystyle \frac{p}{q} with no common factor. The same root written another way need not fit the rule.
Repeated roots. The list says nothing about how often a root occurs. After dividing out a root, test it again on the quotient; what a repeated root does to the graph is Zeros and multiplicity.
Where this goes next
With the factor theorem and synthetic division, the theorem takes a polynomial apart one root at a time, the hand method behind factoring completely and behind Graphing polynomial functions, where the real roots become x-intercepts. The The fundamental theorem of algebra says how many roots to expect in all, so you know when the search is over. Choosing roots and building the polynomial, as in the Intuition, is Building a polynomial from its zeros. And the theorem proves irrationality: x^2 - 2 has candidates \pm 1, \pm 2 only, none works, so \displaystyle \sqrt{2} is not rational, as Irrational numbers shows another way.
Exercises
Day 1: listing candidates
List every candidate the rational root theorem gives.
- x^3 + 4x^2 + x - 6
- 2x^3 + x^2 - 13x + 6
- 4x^3 - 7x + 9
- 6x^4 - x^2 + 5x - 10
Day 1: finding rational roots
- Find the rational roots of the polynomial in Exercise 1, and factor it.
- Find the rational roots of the polynomial in Exercise 2, and factor it.
- Find every root of 3x^3 - 7x^2 + 4.
- Find every root of 8x^3 - 2x^2 - 7x + 3.
- Florimond packs a clay pot in a crate x decimeters wide, 2x + 1 long and 2x - 1 tall, holding 12 cubic decimeters. Show that 4x^3 - x - 12 = 0, use a sign change to pick the one candidate worth testing, and give the crate’s measurements.
Day 2: solving completely
Find every root, real and complex.
- x^3 - 3x^2 - 4x + 6
- 2x^3 + 5x^2 - 6x - 4
- 2x^4 - 7x^3 + 8x + 3
- x^4 + 2x^3 + 2x^2 - 2x - 3
- \displaystyle \frac{1}{2}x^3 + \frac{2}{3}x^2 - \frac{7}{6}x + \frac{1}{3} = 0
- 2x^4 - 3x^3 - 3x^2 + 2x = 0
Day 2: when the list comes up empty
- Show that x^3 + x^2 - 3 has no rational root, but does have a real root between 1 and 2.
- Use the theorem on x^3 - 5 to show that \displaystyle \sqrt[3]{5} is irrational.
Reasoning
- Explain why, when the leading coefficient is 1, every rational root is an integer. Use this to show that \displaystyle \sqrt{7} is irrational.
- Clotilde wants the rational roots of \displaystyle x^2 - \frac{9}{4}. She takes the constant term to be \displaystyle \frac{9}{4} and looks for numbers dividing it. What is wrong, and what are the roots?
- Zbyszek notices that \displaystyle \frac{4}{6} is a root of 3x - 2, yet 4 does not divide -2 and 6 does not divide 3. Why does this not break the theorem, and which step of the proof needs lowest terms?
- Euphemia tests every candidate for a quartic, finds no root, and says the quartic has no real roots. Give a quartic showing she can be wrong.
Answers
- The leading coefficient is 1, so q = 1: \pm 1, \pm 2, \pm 3, \pm 6.
- p \mid 6, q \mid 2: \pm 1, \pm 2, \pm 3, \pm 6, \displaystyle \pm \frac{1}{2}, \displaystyle \pm \frac{3}{2}.
- p \mid 9, q \mid 4: \pm 1, \pm 3, \pm 9, \displaystyle \pm \frac{1}{2}, \displaystyle \pm \frac{3}{2}, \displaystyle \pm \frac{9}{2}, \displaystyle \pm \frac{1}{4}, \displaystyle \pm \frac{3}{4}, \displaystyle \pm \frac{9}{4}.
- p \mid 10, q \mid 6, with repeats such as \displaystyle \frac{2}{2} and \displaystyle \frac{10}{6} dropped: \pm 1, \pm 2, \pm 5, \pm 10, \displaystyle \pm \frac{1}{2}, \displaystyle \pm \frac{5}{2}, \displaystyle \pm \frac{1}{3}, \displaystyle \pm \frac{2}{3}, \displaystyle \pm \frac{5}{3}, \displaystyle \pm \frac{10}{3}, \displaystyle \pm \frac{1}{6}, \displaystyle \pm \frac{5}{6}, which is 24 numbers.
- The coefficients add to 1 + 4 + 1 - 6 = 0, so 1 is a root. Division gives 1, 5, 6, 0, and x^2 + 5x + 6 factors, so the polynomial is (x - 1)(x + 2)(x + 3). Rational roots 1, -2, -3.
- f(2) = 16 + 4 - 26 + 6 = 0. Division by 2 gives 2, 5, -3, 0, so the polynomial is (x - 2)(2x - 1)(x + 3). Rational roots 2, \displaystyle \frac{1}{2}, -3.
- The coefficients add to 3 - 7 + 4 = 0, so 1 is a root. Division of 3, -7, 0, 4 by 1 gives 3, -4, -4, 0, and 3x^2 - 4x - 4 = (3x + 2)(x - 2). Roots 1, 2, \displaystyle -\frac{2}{3}.
- f(-1) = -8 - 2 + 7 + 3 = 0. Division by -1 gives 8, -10, 3, 0, and 8x^2 - 10x + 3 = (2x - 1)(4x - 3). Roots -1, \displaystyle \frac{1}{2}, \displaystyle \frac{3}{4}.
- x(2x + 1)(2x - 1) = x(4x^2 - 1) = 4x^3 - x, which must equal 12. With f(x) = 4x^3 - x - 12, f(1) = -9 and f(2) = 18, so a root lies between 1 and 2; with p \mid 12 and q \mid 4 the only candidate there is \displaystyle \frac{3}{2}. Division by \displaystyle \frac{3}{2} gives 4, 6, 8, 0, and 4x^2 + 6x + 8 has discriminant 36 - 128 = -92, so no other real root. The crate is 1.5 dm by 4 dm by 2 dm.
- 1 - 3 - 4 + 6 = 0, so 1 is a root. Division gives 1, -2, -6, 0, and x^2 - 2x - 6 = 0 gives \displaystyle x = 1 \pm \sqrt{7}. Roots 1, \displaystyle 1 + \sqrt{7}, \displaystyle 1 - \sqrt{7}.
- f(-1) = 5 and f(0) = -4, and the candidate between them is \displaystyle -\frac{1}{2}: \displaystyle f\left(-\frac{1}{2}\right) = -\frac{1}{4} + \frac{5}{4} + 3 - 4 = 0. Division gives 2, 4, -8, 0, and x^2 + 2x - 4 = 0 gives \displaystyle x = -1 \pm \sqrt{5}. Roots \displaystyle -\frac{1}{2}, \displaystyle -1 + \sqrt{5}, \displaystyle -1 - \sqrt{5}.
- Division of 2, -7, 0, 8, 3 by 3 gives 2, -1, -3, -1, 0. On the cubic, division by \displaystyle -\frac{1}{2} gives 2, -2, -2, 0, leaving x^2 - x - 1 = 0, so \displaystyle x = \frac{1 \pm \sqrt{5}}{2}. Roots 3, \displaystyle -\frac{1}{2}, \displaystyle \frac{1 + \sqrt{5}}{2}, \displaystyle \frac{1 - \sqrt{5}}{2}.
- f(1) = 0 and f(-1) = 0. Division by 1 gives 1, 3, 5, 3, 0; then division by -1 gives 1, 2, 3, 0. The discriminant of x^2 + 2x + 3 is -8, so \displaystyle x = -1 \pm i\sqrt{2}. Roots 1, -1, \displaystyle -1 + i\sqrt{2}, \displaystyle -1 - i\sqrt{2}.
- Multiply by 6: 3x^3 + 4x^2 - 7x + 2 = 0. Division by \displaystyle \frac{2}{3} gives 3, 6, -3, 0, leaving x^2 + 2x - 1 = 0, so \displaystyle x = -1 \pm \sqrt{2}. Roots \displaystyle \frac{2}{3}, \displaystyle -1 + \sqrt{2}, \displaystyle -1 - \sqrt{2}.
- Factor out x: x(2x^3 - 3x^2 - 3x + 2) = 0. The cubic has f(-1) = -2 - 3 + 3 + 2 = 0; division gives 2, -5, 2, 0, and 2x^2 - 5x + 2 = (2x - 1)(x - 2). Roots 0, -1, \displaystyle \frac{1}{2}, 2.
- The candidates are \pm 1, \pm 3, and f(1) = -1, f(-1) = -3, f(3) = 33, f(-3) = -21: none is 0, so there is no rational root. But f(1) = -1 and f(2) = 9 have opposite signs, so a real root lies between 1 and 2, and it is irrational.
- \displaystyle \sqrt[3]{5} is a root of x^3 - 5, whose candidates are \pm 1, \pm 5, giving -4, -6, 120, -130. None is 0, so x^3 - 5 has no rational root, and \displaystyle \sqrt[3]{5} is irrational.
- q \mid 1 with q > 0 forces q = 1, so \displaystyle \frac{p}{q} = p, an integer. \displaystyle \sqrt{7} is a root of x^2 - 7, whose candidates are \pm 1, \pm 7, giving -6, -6, 42, 42. None is 0, so \displaystyle \sqrt{7} is irrational.
- The theorem needs integer coefficients, and “divides \displaystyle \frac{9}{4}” means nothing. Multiply by 4: 4x^2 - 9 = 0, with candidates \pm 1, \pm 3, \pm 9, \displaystyle \pm \frac{1}{2}, \displaystyle \pm \frac{3}{2}, \displaystyle \pm \frac{9}{2}, \displaystyle \pm \frac{1}{4}, \displaystyle \pm \frac{3}{4}, \displaystyle \pm \frac{9}{4}. Testing gives the roots \displaystyle \frac{3}{2} and \displaystyle -\frac{3}{2}.
- \displaystyle \frac{4}{6} is not in lowest terms. As \displaystyle \frac{2}{3} it fits: 2 \mid -2 and 3 \mid 3. In the proof, p \mid a_0 q^n becomes p \mid a_0 only because p shares no prime with q; here 4 divides (-2)(6) = -12 but not -2.
- x^4 - 5x^2 + 6 = (x^2 - 2)(x^2 - 3). Its candidates \pm 1, \pm 2, \pm 3, \pm 6 give 2, 2, 42, 1122 (each the same for x and -x), so there is no rational root, yet \displaystyle \pm\sqrt{2} and \displaystyle \pm\sqrt{3} are four real roots.