Ruffini's rule

In mathematics, Ruffini's rule allows the rapid division of any polynomial by a binomial of the form xr. It was described by Paolo Ruffini in 1809. Ruffini's rule is a special case of long division when the divisor is a linear factor. Ruffini's rule is also known as synthetic division. See also polynomial long division for related background.

Contents

Algorithm

The rule establishes a method for dividing the polynomial

<math>P(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0<math>

by the binomial

<math>Q(x)=x-r\,\!<math>

to obtain the quotient polynomial

<math>R(x)=b_{n-1}x^{n-1}+b_{n-2}x^{n-2}+\cdots+b_1+b_0<math>

and a remainder s.

The algorithm is in fact the long division of P(x) by Q(x).

To divide P(x) by Q(x):

1. Take the coefficients of P(x) and write them ordered. Then write r at the bottom left edge, just over the line:

    |        an        an-1        ...        a1         a0
    |                                    
  r |                                    
----|---------------------------------------------------------
    |                                    
    |                                    

2. Pass the leftmost coefficient (an) to the bottom, just under the line:

    |        an        an-1        ...        a1         a0
    |                                    
  r |                                    
----|---------------------------------------------------------
    |    an                     
    |
    |  = bn-1                                
    |

3. Multiply the rightmost number under the line by r and write it over the line and one position to the right:

    |        an        an-1        ...        a1         a0
    |
  r |                  bn-1r
----|---------------------------------------------------------
    |        an
    |
    |      = bn-1                                
    |

4. Add the two values you've just put in the same column

    |        an        an-1        ...        a1         a0
    |
  r |                  bn-1r
----|---------------------------------------------------------
    |        an     an-1+(bn-1r)
    |
    |      = bn-1     = bn-2                                
    |

5. Repeat steps 3 and 4 until you've run out of numbers

    |        an        an-1        ...        a1         a0
    |
  r |                  bn-1r       ...        b1r        b0r
----|---------------------------------------------------------
    |        an     an-1+(bn-1r)   ...       a1+b1r       a0+b0r
    |
    |      = bn-1     = bn-2       ...       = b0        = s
    |

The b values are the coefficients of the result (R(x)) polynomial, the degree of which will be one less than that of P(x). s will be the remainder.

There is a numerical example below.

Uses of the rule

Ruffini's rule has many practical applications; most of them rely on simple division (as demonstrated below) or the common extensions given still further below.

Polynomial division by xr

A worked example of polynomial division, as described above.

Let

<math>P(x)=2x^3+3x^2-4\,\!<math>
<math>Q(x)=x+1\,\!<math>

We want to divide P(x) by Q(x) using Ruffini's rule. The main problem is that Q(x) does not appear to be a binomial of the form xr, but rather x + r. We must rewrite Q(x) in this way:

<math>Q(x)=x+1=x-(-1)\,\!<math>

Now we apply the algorithm:

1. Write down the coefficients and r. Note that, as P(x) didn't contain a coefficient for x, we've written 0:

    |     2     3     0     -4
    |                                    
 -1 |                                    
----|----------------------------
    |                                    
    |

2. Pass the first coefficient down:

    |     2     3     0     -4
    |                                    
 -1 |                                    
----|----------------------------
    |     2                              
    |

3. Multiply the last obtained value by r:

    |     2     3     0     -4
    |                                    
 -1 |          -2                         
----|----------------------------
    |     2                              
    |

4. Add the values:

    |     2     3     0     -4
    |
 -1 |          -2
----|----------------------------
    |     2     1
    |

5. Repeat steps 3 and 4 until we've finished:

    |     2     3     0     -4
    |
 -1 |          -2    -1      1
----|----------------------------
    |     2     1    -1     -3
    |{result coefficients}{remainder}


So, if original number=divisor*quotient+remainder, then

<math>P(x)=Q(x)*R(x)+s\,\!<math>, where
<math>R(x) = 2x^2+x-1\,\!<math> and <math>s=-3\,\!<math>.

Polynomial root-finding

The Rational Root Theorem tells us that for a polynomial f(x)=anxn+an-1xn-1+...+a1x+a0 all of whose coefficients (an through a0) are integers, the real rational roots are always of the form p/q, where p is an integer divisor of a0 and q is an integer divisor of an. Thus if our polynomial is

<math>P(x)=x^3+2x^2-x-2=0\,\!<math>,

then the possible rational roots are all the integer divisors of a0 (−2):

<math>\mbox{Possible roots:}\left\{+1, -1, +2, -2\right\}<math>

(This example is simple because the polynomial is monic (i.e. an=1); for non-monic polynomials the set of possible roots will include some fractions, but only a finite number of them since an and a0 only have a finite number of integer divisors each.) In any case, for monic polynomials, every rational root is an integer, and so every integer root is just a divisor of the constant term. It can be shown that this remains true for non-monic polynomials, i.e. to find the integer roots of any polynomials with integer coefficients, it suffices to check the divisors of the constant term.

So, setting r equal to each of these possible roots in turn, we will test-divide the polynomial by (x-r). If the resulting quotient has no remainder, we have found a root.

You can choose either of the following two methods: they will both yield the same results, with the exception that only through the second method can you discover that a given root is repeated. (Remember that neither method will discover irrational or complex roots.)

Method 1

We try to divide P(x) by the binomial (x − each possible root). If the remainder is 0, the selected number is a root (and vice versa):

    |    +1    +2    -1     -2                      |    +1    +2    -1    -2
    |                                               |
 +1 |          +1    +3     +2                   -1 |          -1    -1    +2
----|----------------------------               ----|---------------------------
    |    +1    +3    +2      0                      |    +1    +1    -2     0
    |    +1    +2    -1     -2                      |    +1    +2    -1    -2
    |                                               |
 +2 |          +2    +8    +14                   -2 |          -2     0    +2
----|----------------------------               ----|---------------------------
    |    +1    +4    +7    +12                      |    +1     0    -1     0
<math>x_1=+1\,\!<math>
<math>x_2=-1\,\!<math>
<math>x_3=-2\,\!<math>

Method 2

We start just as in Method 1 until we find a valid root. Then, instead of restarting the process with the other possible roots, we continue testing the possible roots against the result of the Ruffini on the valid root we've just found until we only have a coefficient remaining (remember that roots can be repeated: if you get stuck, try each valid root twice):

    |    +1    +2    -1    -2                      |    +1    +2    -1    -2
    |                                              |
 -1 |          -1    -1    +2                   -1 |          -1    -1    +2
----|---------------------------               ----|---------------------------
    |    +1    +1    -2   | 0                      |    +1    +1    -2   | 0
    |                                              |
 +2 |          +2    +6                         +1 |          +1    +2
-------------------------                      -------------------------
    |    +1    +3   |+4                            |    +1    +2   | 0
                                                   |
                                                -2 |          -2
                                               -------------------
                                                   |    +1   | 0
<math>x_1=+1\,\!<math>
<math>x_2=-1\,\!<math>
<math>x_3=-2\,\!<math>

Polynomial factoring

Having used the "p/q" result above (or, to be fair, any other means) to find all the real rational roots of a particular polynomial, it is but a trivial step further to partially factor that polynomial using those roots. As is well-known, each linear factor (x-r) which divides a given polynomial corresponds with a root r, and vice versa.

So if

<math>P(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0\,\!<math> is our polynomial; and
<math>R=\left\{\mbox{roots of }P(x)\in\mathbb{Q}\right\}\,\!<math> are the roots we have found, then consider the product
<math>R(x)=a_n{\prod (x-r)} \mbox{ for all } r\in R \,\!<math>.

By the fundamental theorem of algebra, R(x) should be equal to P(x), if all the roots of P(x) are rational. But since we have been using a method which finds only rational roots, it is very likely that R(x) is not equal to P(x); it is very likely that P(x) has some irrational or complex roots not in R. So consider

<math>S(x)=\frac{P(x)}{R(x)}\,\!<math>, which can be calculated using polynomial long division.

If S(x)=1, then we know R(x)=P(x) and we are done. Otherwise, S(x) will itself be a polynomial; this is another factor of P(x) which has no real rational roots. So write out the right-hand-side of the following equation in full:

<math>P(x)=R(x) * S(x)\,\!<math>

We can call this a complete factorization of P(x) over Q (the rationals) if S(x) = 1. Otherwise, we only have a partial factorization of P(x) over Q, which may or may not be further factorable over the rationals; but which will certainly be further factorable over the reals or at worst the complex plane. (Note: by a "complete factorisation" of P(x) over Q, we mean a factorisation as a product of polynomials with rational coefficients, such that each factor is irreducible over Q, where "irreducible over Q" means that the factor cannot be written as the product of two non-constant polynomials with rational coefficients and smaller degree.)

Example 1: no remainder

Let

<math>P(x)=x^3+2x^2-x-2\,\!<math>

Using the methods described above, the rational roots of P(x) are:

<math>R=\left\{+1, -1, -2\right\}\,\!<math>

Then, the products of (x − each root) is

<math>R(x)=1(x-1)(x+1)(x+2)\,\!<math>

And P(x)/Q(x):

<math>S(x)=1\,\!<math>

Hence the factored polynomial is P(x) = R(x) * 1 = R(x):

<math>P(x)=(x-1)(x+1)(x+2)\,\!<math>

Example 2: with remainder

Let

<math>P(x)=2x^4-3x^3+x^2-2x-8\,\!<math>

Using the methods described above, the rational roots of P(x) are:

<math>R=\left\{-1, +2\right\}\,\!<math>

Then, the products of (x − each root) is

<math>R(x)=2(x+1)(x-2)\,\!<math>

And P(x)/Q(x)

<math>S(x)=2x^2-x+4\,\!<math>

As <math>S(x){\ne}1<math>, the factored polynomial is P(x) = R(x) * S(x):

<math>P(x)=(x+1)(x-2)(2x^2-x+4)\,\!<math>

Factoring over the complexes

To completely factor a given polynomial over C, the complex numbers, we must know all of its roots (and that could include irrational and/or complex numbers). For example, consider the polynomial above:

<math>P(x)=2x^4-3x^3+x^2-2x-8\,\!<math>.

Extracting its rational roots and factoring it, we end with:

<math>P(x)=(x+1)(x-2)(2x^2-x+4)\,\!<math>.

But that is not completely factored over C. If we need to factor our polynomial to a product of linear factors, we must deal with that quadratic factor

<math>{2x^2-x+4}=0\,\!<math>.

The easiest way is to use quadratic formula, which gives us

<math>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}=\frac{1\pm\sqrt{(-1)^2-4\cdot 2\cdot 4}}{2\cdot 2}=\frac{1\pm\sqrt{-31}}{4}\,\!<math>

and the solutions

<math>x_1=\frac{1+\sqrt{-31}}{4}\,\!<math>
<math>x_2=\frac{1-\sqrt{-31}}{4}\,\!<math>.

So the completely-factored polynomial over C will be:

<math>P(x)=(x+1)(x-2)(x-\frac{1+i\sqrt{31}}{4})(x-\frac{1-i\sqrt{31}}{4})\,\!<math>.

However, it should be noted that we cannot in every case expect things to be so easy; the quadratic formula's analogue for fourth-order polynomials is very messy and no such analogue exists for 5th-or-higher order polynomials. See Galois theory for a theoretical explanation of why this is so, and see numerical analysis for ways to approximate roots of polynomials numerically

Limitations

Moreover, it is entirely possible that, in looking for a given polynomial's roots, we might obtain a messy higher-order polynomial for S(x) which is further factorable over the rationals even before considering irrational or complex factorings. Consider the polynomial x5-3x4+3x3-9x2+2x-6. Using Ruffini's method we will find only one root (x=-3); factoring it out gives us P(x)=(x4+3x2+2)(x-3).

As explained above, if our assignment was to "factor into irreducibles over C" we know that would have to find some way to dissect the quartic and look for its irrational and/or complex roots. But if we were asked to "factor into irreducibles over Q", we might think we are done; but it is important to realize that this might not necessarily be the case.

For in this instance the quartic is actually factorable as the product of two quadratics (x2+1)(x2+2). These, at last, are irreducible over the rationals (and, indeed, the reals as well in this example); so now we are done; P(x)=(x2+1)(x2+2)(x-3). In this instance it is in fact easy to factor our quartic by treating it as a biquadratic equation; but finding such factorings of a higher degree polynomial can be very difficult.

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools