01.12.2014 Views

LECTURE 3: Polynomial interpolation and numerical differentiation

LECTURE 3: Polynomial interpolation and numerical differentiation

LECTURE 3: Polynomial interpolation and numerical differentiation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.10 Neville’s algorithm<br />

Another widely used method for obtaining the interpolating polynomial for a given table<br />

of values is given by Neville’s algorithm. It builds up the polynomial in steps, just as the<br />

Newton algorithm does.<br />

Let P a,b,...,s be the polynomial interpolating the given data at a sequence of nodes x a ,x b ,...,x s .<br />

We start with constant polynomials P i (x)= f(x i ). Selecting two nodes x i <strong>and</strong> x j with i> j,<br />

we define recursively<br />

( ) ( )<br />

x−x j<br />

xi − x<br />

P u,...,v (x)= P u,..., j−1, j+1,...,v (x)+ P u,...,i−1,i+1,...,v (x)<br />

x i − x j x i − x j<br />

For example, the first three constant polynomials are<br />

P 0 (x)= f(x 0 ) P 1 (x)= f(x 1 ) P 2 (x)= f(x 2 )<br />

Using P 0 <strong>and</strong> P 1 , we can construct P 0,1 :<br />

( ) ( )<br />

x−x0 x1 − x<br />

P 0,1 (x)= P 1 + P 0<br />

x 1 − x 0 x 1 − x 0<br />

<strong>and</strong> similarly<br />

P 1,2 (x)=<br />

( ) ( )<br />

x−x1 x2 − x<br />

P 2 + P 1<br />

x 2 − x 1 x 2 − x 1<br />

Using these two polynomials of degree one, we can construct another polynomial of degree<br />

two: ( ) ( )<br />

x−x0 x2 − x<br />

P 0,1,2 (x)= P 1,2 + P 0,1<br />

x 2 − x 0 x 2 − x 0<br />

Similarly,<br />

P 0,1,2,3 (x)=<br />

( ) ( )<br />

x−x0<br />

x3 − x<br />

P 1,2,3 + P 0,1,2<br />

x 3 − x 0 x 3 − x 0<br />

Using this formula repeatedly, we can create an array of polynomials:<br />

x 0<br />

x 1<br />

x 2<br />

x 3<br />

x 4<br />

P 0 (x)<br />

P 1 (x) P 0,1 (x)<br />

P 2 (x) P 1,2 (x) P 0,1,2 (x)<br />

P 3 (x) P 2,3 (x) P 1,2,3 (x) P 0,1,2,3 (x)<br />

P 4 (x) P 3,4 (x) P 2,3,4 (x) P 1,2,3,4 (x) P 0,1,2,3,4 (x)<br />

Here each successive polynomial can be determined from two adjacent polynomials in<br />

the previous column.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!