0% found this document useful (0 votes)
62 views

Polynomial Interpolation: Math 128A Spring 2002 Handout # 9 Sergey Fomel February 19, 2002

This document discusses different methods of polynomial interpolation, including Lagrange, Newton, and Neville interpolation. It provides an example of interpolating a function at three nodes and compares the true function values to the interpolated polynomial. Lagrange interpolation uses basis polynomials that are 1 at a node and 0 at other nodes. Newton interpolation uses divided differences and basis polynomials involving differences of the nodes. Neville interpolation defines polynomials recursively to interpolate at increasing numbers of nodes.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Polynomial Interpolation: Math 128A Spring 2002 Handout # 9 Sergey Fomel February 19, 2002

This document discusses different methods of polynomial interpolation, including Lagrange, Newton, and Neville interpolation. It provides an example of interpolating a function at three nodes and compares the true function values to the interpolated polynomial. Lagrange interpolation uses basis polynomials that are 1 at a node and 0 at other nodes. Newton interpolation uses divided differences and basis polynomials involving differences of the nodes. Neville interpolation defines polynomials recursively to interpolate at increasing numbers of nodes.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Math 128A Spring 2002 Handout # 9

Sergey Fomel February 19, 2002

Polynomial Interpolation (Mathematica notebook:


http://math.lbl.gov/~fomel/128A/Polynomial.nb)

Example Function

An example function for studying polynomial interpolation is

1
f (x) = .
x

0.8

0.6

0.4

0.2

1 2 3 4 5 6

We select three nodes and find the interpolating polynomial for them.

x 2 4 5
f 0.5 0.25 0.2

The second-order interpolation polynomial does not reconstruct the function exactly but fits the
input data.

1
1
True

0.8

Interpolation
0.6

0.4

0.2

1 2 3 4 5 6

Lagrange Interpolation

The Lagrange form of the interpolation polynomial is


n
X
P(x) = f k L k (x) ,
k=1

where Y x − xi
L k (x) = .
xk − xi
i6=k

In our example,

(x − 4) (x − 5) (x − 4) (x − 5)
L 1 (x) = =
(2 − 4) (2 − 5) 6
(x − 2) (x − 5) (x − 2) (x − 5)
L 2 (x) = =−
(4 − 2) (4 − 5) 2
(x − 2) (x − 4) (x − 2) (x − 4)
L 3 (x) = =
(5 − 2) (5 − 4) 3

2
Lagrange Polynomials

L2
L1 L3
2

-1

-2
1 2 3 4 5 6

L 1 (x) is one at x1 = 2 and zero at x2 = 4 and x3 = 5. Likewise, L 2 (x) is one at x2 and zero at x1
and x3 . L 3 (x) is one at x3 and zero at x1 and x2 .
Putting it all together,
(x − 4) (x − 5) (x − 2) (x − 5) (x − 2) (x − 4)
P(x) = − + = 0.025 x 2 − 0.275 x + 0.95 .
12 8 15
Lagrange Interpolation

0.8

0.6

0.4

0.2

1 2 3 4 5 6

Newton Interpolation

The Newton form of the interpolation polynomial is


n
X
P(x) = f [x1 x2 , . . . , xk ] Nk (x) ,
k=1

3
where
k−1
Y
Nk (x) = (x − xi ) ,
i=1
and f [x1 x2 , . . . , xk ] is the divided difference, evaluated with the help of the recursive relationship

f [xk ] = fk
f [x2 , . . . , xk ] − f [x1 . . . , xk−1 ]
f [x1 x2 , . . . , xk ] =
xk − x1
In our example,

N1 (x) = 1
N2 (x) = x − 2
N3 (x) = (x − 2) (x − 4)
Newton Polynomials
8

6 N3

N2
4 N1

1 2 3 4 5 6

The divided difference table is

f [x1 ] = 0.5
0.25−0.5
f [x2 ] = 0.25 f [x1 , x2 ] = 4−2 = −0.125
0.2−0.25 −0.05+0.125
f [x3 ] = 0.2 f [x2 , x3 ] = 5−4 = −0.05 f [x1 , x2 , x3 ] = 5−2 = 0.025

Putting it all together,

1 x − 2 (x − 2) (x − 4)
P(x) = − + = 0.025 x 2 − 0.275 x + 0.95 .
2 8 40

4
Newton Interpolation

0.8

0.6

0.4

0.2

1 2 3 4 5 6

Neville Interpolation

The Neville form of the interpolation polynomial is defined by recursion

P0 (x) = f1
Pk−2 (x) (xk − x) − Q k−2 (x) (x − x1 )
Pk−1 (x) = ,
xk − x1
where Pk−1 (x) interpolates at nodes x1 , x2 , . . . , xk , and Q k−2 (x) interpolates at nodes x2 , . . . , xk .
The zeroth-order Neville polynomials are constant functions.
Neville Polynomials, Order 0

0.8

0.6

0.4

0.2

1 2 3 4 5 6

5
The first-order Neville polynomials are
1 1
2 (4 − x) + 4 (x − 2) 6−x
P1 (x) = =
4−2 8
1 1
4 (5 − x) + 5 (x − 4) 9−x
Q 1 (x) = =
5−4 20
Neville Polynomials, Order 1

0.8

0.6

0.4

0.2

1 2 3 4 5 6

The second-order Neville polynomial is


6−x
8 (5 − x) + 9−x
20 (x − 2) (6 − x) (5 − x) (9 − x) (x − 2)
P2 (x) = = + = 0.025 x 2 − 0.275 x + 0.95 .
5−2 24 60
Neville Interpolation

0.8

0.6

0.4

0.2

1 2 3 4 5 6

You might also like