Vous êtes sur la page 1sur 10

# Polynomial Evaluation

## Convert to nested form:

Horners Algorithm
How many operations are required to evaluate
the polynomial

## naively and using Horners algorithm?

Naive:

FLOPS
Horners:

FLOPS
Horners Algorithm
Pseudocode

## integer i, n; double p, x; real array a;

//here is the highest order coefficient
for to do //reverse of coefficients are high to low

end for
Synthetic Division
Divide the polynomial

by

Synthetic Division
Examples
Use
synthetic division to compute the following
polynomials
Prove that it works by multiplying your result by the
denominator

Horners algorithm performs
synthetic division
If we have a 4th degree polynomial:

## We can perform synthetic division to factor out :

polynomial
(nested form)
Why does this even work?
If we have a 4th degree polynomial:

## We can perform synthetic division to factor out :

Why does this even work?
Starting
with the 4th degree polynomial:

## When , the first term becomes zero

The remainder is the result of
Synthetic division and
derivatives
Given an -order polynomial and a value

We compute such that:

Since :

## Everything we dont know cancels out at

The polynomial is the derivative at (and only at)

## Horners algorithm simultaneously computes:

The value of any polynomial at
The derivative of at as a polynomial
Horners Algorithm for
derivatives
Use
synthetic division to compute the values of
both the polynomials and their derivatives at