TITLE: Using Horner's Method
QUESTION [10 upvotes]: I'm trying to evaluate a polynomial recursively using Horner's method.
It's rather simple when I have every value of $x$ (like: $x+x^2+x^3...$), but what if I'm missing some of those? Example: $-6+20x-10x^2+2x^4-7x^5+6x^7$.
I would also appreciate it if someone could explain the method in more detail, I've used the description listed here but would like some more explanation.

REPLY [6 votes]: You can also carry it out in a synthetic division table.  Suppose you want to evaluate $f(x) = x^4 - 3x^2 + x - 5$ for $x = 3$. Set up a table like this


              1    0     -3    1     5
          3
             -------------------------
              1

Now multiply the number on the bottom and total as follows.


              1    0     -3    1     5
          3        3
             -------------------------
              1    3

Work your way across in this manner.


              1    0     -3    1     -5
          3        3      9   18    57
             -------------------------
              1    3      6   19    52

We have $f(3) = 52$.  Let's run a check
$$ f(3) = 81 -3*9 + 3 - 5 = 54 - 2 = 52.$$
$$ f(3) = 54 - 2 = 52.$$
This is a clean, tabular way to see Horner's method work.