You are on page 1of 2

MACM 316 Neville’s Method

1 Neville’s Method
Neville’s method can be applied in the situation that we want to interpolate f (x) at a given point x = p with
increasingly higher order Lagrange interpolation polynomials.
For concreteness, consider three distinct points x0 ,x1 , and x2 at which we can evaluate f (x) exactly f (x0 ),f (x1 ),f (x2 ).
From each of these three points we can construct an order zero (constant) “polynomial” to approximate f (p)

f (p) ≈ P0 (p) = f (x0 ) (1)


f (p) ≈ P2 (p) = f (x1 ) (2)
f (p) ≈ P3 (p) = f (x2 ) (3)
(4)

Of course this isn’t a very good approximation so we turn to first order Lagrange polynomials
x − x1 x − x0
f (p) ≈ P0,1 (p) = f (x0 ) + f (x1 ) (5)
x0 − x1 x1 − x0
x − x2 x − x1
f (p) ≈ P1,2 (p) = f (x1 ) + f (x2 ) (6)
x1 − x2 x2 − x1
There is also P0,2 , but we won’t concern ourselves with that one.
If we note that f (xi ) = Pi (x), we find
x − x1 x − x0
P0,1 (p) = P0 (p) + P1 (p) (7)
x0 − x1 x1 − x0
(x − x1 )P0 (p) − (x − x0 )P1 (p)
= (8)
x0 − x1
and similarly

(x − x2 )P1 (p) − (x − x1 )P2 (p)


P0,1 (p) = (9)
x1 − x2
In general we want to multiply Pi (x) by (x − xj ) where j 6= i (i.e., xj is a point that is NOT interpolated by
Pi (x)). We take the difference of two such products and divide by the difference between the added points.
The result is a polynomial Pi,i−1 of one degree higher than either of the two used to construct it and that
interpolates all the points of the two constructing polynomials combined.
This idea can be extended to construct the third order polynomial P0,1,2

(p − x2 )P0,1 (p) − (p − x0 )P1,2 (p)


P0,1,2 (p) = (10)
x0 − x2
A little algebra will convince you that

(p − x1 )(p − x2 ) (p − x0 )(p − x2 ) (p − x0 )(p − x1 )


P0,1,2 (p) = f (x0 ) + f (x1 ) + f (x2 ) (11)
(x0 − x1 )(x0 − x2 ) (x1 − x0 )(x1 − x2 ) (x2 − x0 )(x2 − x1 )

which is just the 3rd order Lagrange polynomial interpolating the points x0 ,x1 ,x2 . This shouldn’t surprise you since
this is the unique third order polynomial interpolating these three points.

2 Example
We are given the function
1
f (x) = (12)
x
We want to approximate the value f (3).
MACM 316 Neville’s Method

First we evaluate the function at the three points

i xi f (xi )
0 2 0.5
(13)
1 2.5 0.4
2 4 0.25

We can first make three separate zero-order approximations

f (3) ≈ P0 (3) = f (x0 ) = 0.5 (14)


f (3) ≈ P1 (3) = f (x1 ) = 0.4 (15)
f (3) ≈ P2 (3) = f (x2 ) = 0.25 (16)

From these we proceed to construct P0,1 and P1,2 by using the Neville formula

(3 − x1 )P0 (3) − (3 − x0 )P1 (3) (3 − 2.5)0.5 − (3 − 2)0.4


f (3) ≈ P0,1 (3) = = = 0.3 (17)
x0 − x1 2 − 2.5
(3 − x2 )P1 (3) − (3 − x1 )P2 (3) (3 − 4)0.4 − (3 − 2.5)0.25
f (3) ≈ P1,2 (3) = = = 0.35 (18)
x1 − x2 2.5 − 4
So we can add these numbers to our table

i xi Pi Pi,i−1
0 2 0.5
(19)
1 2.5 0.4 0.3
2 4 0.25 0.35

Finally we can compute P0,1,2 using P0,1 and P1,2

(3 − x2 )P0,1 (3) − (3 − x0 )P1,2 (3) (3 − 4)(0.3) − (3 − 2)0.35


f (3) ≈ P0,1,2 (3) = = = 0.325 (20)
x0 − x2 4−2

i xi Pi Pi,i−1 Pi,i−1,i−2
0 2 0.5
(21)
1 2.5 0.4 0.3
2 4 0.25 0.35 0.325

If you find yourself in the unusual situation that you know P0,1,2 , and one of P0,1 , or P1,2 , but not the other, you
can always rearrange Eq. 20 to suit your purposes.

You might also like