0% found this document useful (0 votes)
17 views36 pages

EEE212 Week5

The document provides an introduction to polynomial interpolation. It discusses linear and quadratic interpolation and Newton's divided difference method. The key points are: 1) Polynomial interpolation finds a polynomial that passes exactly through a set of data points. Higher degree polynomials can interpolate more points. 2) For any n+1 data points there exists a unique nth degree polynomial that interpolates those points. 3) Divided differences are used to compute the coefficients of the interpolating polynomial in a systematic way. The divided difference table fully determines the interpolating polynomial. 4) The ordering of points in divided differences does not change the interpolating polynomial. Divided differences provide a method for polynomial interpolation that is independent of point ordering

Uploaded by

melike
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views36 pages

EEE212 Week5

The document provides an introduction to polynomial interpolation. It discusses linear and quadratic interpolation and Newton's divided difference method. The key points are: 1) Polynomial interpolation finds a polynomial that passes exactly through a set of data points. Higher degree polynomials can interpolate more points. 2) For any n+1 data points there exists a unique nth degree polynomial that interpolates those points. 3) Divided differences are used to compute the coefficients of the interpolating polynomial in a systematic way. The divided difference table fully determines the interpolating polynomial. 4) The ordering of points in divided differences does not change the interpolating polynomial. Divided differences provide a method for polynomial interpolation that is independent of point ordering

Uploaded by

melike
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Introduction to Interpolation

Introduction
Interpolation Problem
Existence and Uniqueness
Linear and Quadratic Interpolation
Newton’s Divided Difference Method
Properties of Divided Differences

1
Introduction
Interpolation was used for x sin(x)
long time to provide an
0 0.0000
estimate of a tabulated
function at values that are 0.1 0.0998
not available in the table.
0.2 0.1987

What is sin (0.15)? 0.3 0.2955


0.4 0.3894

Using Linear Interpolation sin (0.15) ≈ 0.1493


True value (4 decimal digits) sin (0.15) = 0.1494
2
The Interpolation Problem
Given a set of n+1 points,

x0 , f ( x0 ) , x1, f ( x1 ) , ...., xn , f ( xn ) 


Find an nth order polynomial f n (x )
that passes through all points, such that:

f n ( xi )  f ( xi ) for i  0,1, 2,..., n

3
Example
Temperature Viscosity
An experiment is used to determine (degree)
the viscosity of water as a function
of temperature. The following table
0 1.792
is generated:
5 1.519

10 1.308
Problem: Estimate the viscosity
when the temperature is 8 degrees.
15 1.140

4
Interpolation Problem
Find a polynomial that fits the data
points exactly.
V : Viscosity
n
V(T)   ak T k T : Temperature
k 0 ak : Polynomial
Vi  V(Ti ) coefficients
Linear Interpolation: V(T)= 1.73 − 0.0422 T
V(8)= 1.3924
5
Existence and Uniqueness
Given a set of n+1 points:
x0 , f ( x0 ) , x1, f ( x1 ) , ...., xn , f ( xn ) 
Assumption: x0 , x1 ,..., xn are distinct

Theorem:
There is a unique polynomial fn(x) of order ≤ n
such that:
f n ( xi )  f ( xi ) for i  0 ,1,...,n
6
Examples of Polynomial Interpolation
Linear Interpolation Quadratic Interpolation

 Given any two points, Given any three points there


there is one polynomial of is one polynomial of order ≤
order ≤ 1 that passes 2 that passes through the
through the two points. three points.

7
Linear Interpolation
Given any two points,  x0 , f ( x0 ) ,  x1 , f ( x1 ) 

The line that interpolates the two points is:


f ( x1 )  f ( x0 )
f1 ( x)  f ( x0 )  x  x0 
x1  x0
Example :
Find a polynomial that interpolates (1,2) and (2,4).

42
f1 ( x)  2  x  1  2 x
2 1

8
Quadratic Interpolation
 Given any three points:x0 , f ( x0 ) , x1 , f ( x1 ) , and x2 , f ( x2 ) 
 The polynomial that interpolates the three points is:

f 2 ( x)  b0  b1  x  x0   b2 x  x0  x  x1 
where :
b0  f ( x0 )
f ( x1 )  f ( x0 )
b1  f [ x0 , x1 ] 
x1  x0
f ( x2 )  f ( x1 ) f ( x1 )  f ( x0 )

x2  x1 x1  x0
b2  f [ x0 , x1 , x2 ] 
x2  x0
9
General n th Order Interpolation
Given any n+1 points: x0 , f ( x0 ) , x1 , f ( x1 ) , ..., xn , f ( xn ) 
The polynomial that interpolates all points is:

f n ( x)  b0  b1  x  x0   b2 x  x0  x  x1   ...  bn x  x0 ... x  xn 1 
b0  f ( x0 )
b1  f [ x0 , x1 ]
....
bn  f [ x0 , x1 , ... , xn ]

10
Divided Differences
f [ xk ]  f ( xk ) Zeroth order DD
f [ x1 ]  f [ x0 ]
f [ x0 , x1 ]  First order DD
x1  x0
f [ x1 , x2 ]  f [ x0 , x1 ]
f [ x0 , x1 , x2 ]  Second order DD
x2  x0
............
f [ x1 , x2 ,..., xk ]  f [ x0 , x1 ,..., xk 1 ]
f [ x0 , x1 ,..., xk ] 
xk  x0

11
Divided Difference Table
x F[ ] F[ , ] F[ , , ] F[ , , ,]
x0 F[x0] F[x0,x1] F[x0,x1,x2] F[x0,x1,x2,x3]
x1 F[x1] F[x1,x2] F[x1,x2,x3]
x2 F[x2] F[x2,x3]
x3 F[x3]

 i 1 
x  x j 
n
f n ( x)    F [ x0 , x1 ,..., xi ] 
i 0  j 0 

12
Divided Difference Table
x F[ ] F[ , ] F[ , , ]
xi f(xi)
0 -5 2 -4
1 -3 6
0 -5
-1 -15 1 -3
-1 -15
Entries of the divided difference
table are obtained from the data
table using simple operations.

13
Divided Difference Table
x F[ ] F[ , ] F[ , , ] xi f(xi)
0 -5 2 -4 0 -5
1 -3 6 1 -3
-1 -15 -1 -15

The first two column of the


table are the data columns.
Third column: First order differences.
Fourth column: Second order differences.
14
Divided Difference Table
x F[ ] F[ , ] F[ , , ] xi yi
0 -5 2 -4 0 -5
1 -3 6
-1 -15 1 -3
-1 -15
 3  (5)
2
1 0
f [ x1 ]  f [ x0 ]
f [ x0 , x1 ] 
x1  x0

15
Divided Difference Table
x F[ ] F[ , ] F[ , , ] xi yi
0 -5 2 -4 0 -5
1 -3 6
-1 -15 1 -3
-1 -15
 15  (3)
6
11

f [ x2 ]  f [ x1 ]
f [ x1 , x2 ] 
x2  x1

16
Divided Difference Table
x F[ ] F[ , ] F[ , , ] xi yi
0 -5 2 -4 0 -5
1 -3 6
-1 -15 1 -3
-1 -15

6  (2)
 4
 1  (0)
f [ x1 , x2 ]  f [ x0 , x1 ]
f [ x0 , x1 , x2 ] 
x2  x0
17
Divided Difference Table
x F[ ] F[ , ] F[ , , ] xi yi
0 -5 2 -4 0 -5
1 -3 6
-1 -15 1 -3
-1 -15

f 2 ( x)  5  2( x  0)  4( x  0)( x  1)

f2(x)= F[x0]+F[x0,x1] (x-x0)+F[x0,x1,x2] (x-x0)(x-x1)


18
Two Examples
Obtain the interpolating polynomials for the two examples:

x y x y

1 0 2 3

2 3 1 0

3 8 3 8

What do you observe?

19
Two Examples
x Y
x Y
1 0 3 1 2 3 3 1
2 3 5 1 0 4
3 8 3 8

P2 ( x)  0  3( x  1)  1( x  1)( x  2) P2 ( x)  3  3( x  2)  1( x  2)( x  1)
 x2 1  x2 1

Ordering the points should not affect the interpolating polynomial.

20
Properties of Divided Difference
Ordering the points should not affect the divided difference:

f [ x0 , x1 , x2 ]  f [ x1 , x2 , x0 ]  f [ x2 , x1 , x0 ]

21
Example
 Find a polynomial to x f(x)
interpolate the data.
2 3

4 5

5 1

6 6

7 9

22
Example
x f(x) f[ , ] f[ , , ] f[ , , , ] f[ , , , , ]
2 3 1 -1.6667 1.5417 -0.6750
4 5 -4 4.5 -1.8333
5 1 5 -1
6 6 3
7 9
f 4  3  1( x  2)  1.6667( x  2)( x  4)  1.5417( x  2)( x  4)( x  5)
 0.6750( x  2)( x  4)( x  5)( x  6)

23
Summary
Interpolating Condition : f ( xi )  f n ( xi ) for i  0, 1, 2, ..., n
* The interpolating Polynomial is unique.
* Different methods can be used to obtain it
- Newton Divided Difference [Section 18.1 ]
- Lagrange Interpolation [Section 18. 2]
- Other methods

Ordering the points should not affect the interpolating polynomial.

24
The concept of the spline originated from the drafting technique of using a thin,
flexible strip (called a spline) to draw smooth curves through a set of points.

You might also like