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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 <strong>Polynomial</strong> <strong>interpolation</strong><br />

2.1 Interpolating polynomial<br />

Given a set of n+1 data points {x i ,y i }, we want to find a polynomial curve that passes<br />

through all the points. Thus, we look for a continuous curve which takes on the values y i<br />

for each of the n+1 distinct x i ’s.<br />

A polynomial p for which p(x i )=y i when 0≤i≤n is said to interpolate the given set of<br />

data points. The points x i are called nodes.<br />

The trivial case is n=0. Here a constant function p(x)=y 0 solves the problem.<br />

The simplest case is n=1. In this case, the polynomial p is a straight line defined by<br />

( ) ( )<br />

x−x1 x−x0<br />

p(x)= y 0 + y 1<br />

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

( ) 0<br />

y1 − y 0<br />

= y 0 + (x−x 0 )<br />

x 1 − x 0<br />

Here p is used for linear <strong>interpolation</strong>.<br />

As we will see, the interpolating polynomial can be written in a variety of forms, among<br />

these are the Newton form <strong>and</strong> the Lagrange form. These forms are equivalent in the<br />

sense that the polynomial in question is the one <strong>and</strong> the same (in fact, the solution to the<br />

<strong>interpolation</strong> task is given by a unique polynomial)<br />

We begin by discussing the conceptually simpler Lagrange form. However, a straightforward<br />

implementation of this form is somewhat awkward to program <strong>and</strong> unsuitable for<br />

<strong>numerical</strong> evaluation (e.g. the resulting algorithm gives no error estimate). The Newton<br />

form is much more convenient <strong>and</strong> efficient, <strong>and</strong> therefore, it is used as the basis for<br />

<strong>numerical</strong> algorithms.<br />

2.2 Lagrange form<br />

First define a system of n+1 special polynomials l i known as cardinal functions. These<br />

have the following property:<br />

{<br />

0 if i≠ j<br />

l i (x j )=δ i j =<br />

1 if i= j<br />

The cardinal functions l i can be written as the product of n linear functions (the variable<br />

x occurs only in the numerator of each term; the denominators are just numbers):<br />

( ) x−x j<br />

l i (x)= (0≤i≤n)<br />

x i − x j<br />

=<br />

n<br />

∏<br />

j≠i<br />

j=0<br />

( )( )<br />

x−x0 x−x1<br />

...<br />

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

Thus l i is a polynomial of degree n.<br />

( )( ) ( )<br />

x−xi−1 x−xi+1 x−xn<br />

...<br />

x i − x i−1 x i − x i+1 x i − x n

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

Saved successfully!

Ooh no, something went wrong!