Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Best sites for teachers
Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Reciprocal links
Privacy Policy

Guest book
News sites

Recommend this site

Best sites for teachers
Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Horner's Method

Horner's method (also Horner Algorithm and Horner Scheme) is an efficient way of evaluating polynomials and their derivatives at a given point. It is also used for a compact presentation of the long division of a polynomial by a linear polynomial. The method is named after the British mathematician William George Horner (1786 – 1837).

A polynomial P(x) can be written in the descending order of the powers of x:

  P(x) = anxn + an-1xn-1 + ... + a1x + a0

or in the ascending order of the exponents:

  P(x) = a0 + a1x + ... + an-1xn-1 + anxn.

The Horner scheme computes the value P(t) of the polynomial P at x = t as the sequence of steps starting with the leading coefficient an:

(1) bk = t·bk+1 + ak,

k = n - 1, n - 2, ..., 1, 0 and bn = an, with b0 = P(t). This follows from a special form of the polynomial

  P(x) = ( ... (anx + an-1) x + ... + a1) x + a0

in the descending order of the exponents or in the ascending order as in

  P(x) = a0 + x (a1 + x (a2 + x (... + x (an-1 + x an) ... ).

For example, the polynomial P(x) = 2x4 - 3x3 + x + 7 can be written as

  P(x) = (((2x - 3) x + 0) x + 1) x + 7,

or else as

  P(x) = 7 + x (1 + x (0 + x (-3 + x·2))).

According to (1), say P(2) comes out as the last term in the sequence

 
b4= a4= 2
b3= 2·b4 + a3= 1
b2= 2·b3 + a2= 2
b1= 2·b2 + a1= 5
b0= 2·b1 + a0= 7

These calculations are conveniently arranged into a table

  a table for Horner's method

or, in the ascending order, with calculations carried right to left,

  a table for Horner's method

where the first row lists the coefficients of the polynomial, the third row the sequence of computed bi's. The auxiliary quantities 2·bi's are placed diagonally from bi's and under the ai-1 they are summed with according to (1). Thus we see that P(2) = 7, the last of the b's.

The other terms in the last row also come in handy. By direct verification one can check that

  P(x) = 2x4 - 3x3 + x + 7 = (x - 2)(2x3 + x2 + 2x + 5) + 7.

So the coefficients b in the last row comprise both the quotient of the division of P(x) by (x - 2), viz. Q(x) = 2x3 + x2 + 2x + 5, and the remainder 7. In fact if you carry out the multiplication (x - 2)Q(x) and observe the manner in which the like powers of x combine, you could not help but notice an additional justification for the algorithm (1).

Note also that P(x) = (x - 2)Q(x) + 7 implies P(2) = 7. This follows by substitution P(2) = (2 - 2)Q(2) + 7 and holds true regardless of the value Q(2). However the latter is also a meaningful quantity as we shall see shortly.

The applet below helps finding more examples of the workings of the Horner scheme. All blue numbers (the coefficients of P, the highest power of x and the specific value of x in the third line are clickable. Click on both sides of their vertical midline to see how they change.)


This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet

Let's now see what additional use can be made of the quantity Q(t) in

(2) P(x) = (x - t)Q(x) + r,

where Q(x) is the quotient of P(x) / ( x - t) and r is the remainder. Both appear in the third row of the Horner scheme. This material is intended for the beginning Calculus students. Let's differentiate (2). By the product rule,

 
P'(x)= [(x - t)Q(x) + r]'
 = (x - t)'Q(x) + (x - t)Q'(x)
 = Q(x) + (x - t)Q'(x).

It follows that

 
P'(t)= Q(t) + (t - t)Q'(t)
 = Q(t).

Using the example of P(x) = 2x4 - 3x3 + x + 7, we see that, in addition to P(2) = 7, we can obtain P'(2) by computing the quotient Q(x) = 2x3 + x2 + 2x + 5 for x = 2, for P'(2) = Q(2). This calls for appending additional two rows two the Horner table to allow computing of Q(2) with the help of the Horner scheme.

References

  1. K. Atkinson, Elementary Numerical Analysis, John Wiley & Sons, 1985

Copyright © 1996-2008 Alexander Bogomolny

28776337Page copy protected against web site content infringement by Copyscape


Search:
Keywords:


Latest on CTK Exchange
Math
Posted by Laura
2 messages
06:56 AM, Apr-15-08

Divisibility rules - Jargon buste ...
Posted by Carolyn
2 messages
08:35 AM, Apr-04-08

drawing puzzle
Posted by martin gran
31 messages
06:53 PM, May-09-08

conway's game of life
Posted by frequency
0 messages
11:52 PM, May-12-08

Mistake on the page (an aside, Be ...
Posted by Max
4 messages
10:28 AM, Feb-28-08

Need details on a part of Proof o ...
Posted by Manuel S.
2 messages
05:24 PM, May-16-08

Josephus Flavius (correction)
Posted by David Turner
1 messages
09:42 AM, May-14-08