Professional Documents
Culture Documents
Interpolation 1 PDF
Interpolation 1 PDF
INTERPOLATION
PRESENTED BY:
Paramjeet Sangwan
Assistant Professor
Mathematics
Introduction
Interpolation was used for long time x sin(x)
to provide an estimate of a
tabulated function at values that are 0 0.0000
not available in the table. 0.1 0.0998
0.2 0.1987
What is sin (0.15)?
0.3 0.2955
0.4 0.3894
10 1.308
Problem: Estimate the viscosity when the
temperature is 8 degrees.
15 1.140
Interpolation Problem
Find a polynomial that fits the data points exactly.
V : Viscosity
T : Temperature
ak : Polynomial
coefficien ts
n
V(T) ak T k
k 0
Vi V(Ti )
Linear Interpolation: V(T)= 1.73 − 0.0422 T
V(8)= 1.3924
Existence and Uniqueness
Given a set of n+1 points:
Theorem:
There is a unique polynomial fn(x) of order ≤ n such that:
f n ( xi ) f ( xi ) for i 0,1,...,n
Examples of Polynomial Interpolation
Linear Interpolation Quadratic Interpolation
• Given any two points, there is Given any three points there is one
one polynomial of order ≤ 1 that polynomial of order ≤ 2 that passes
passes through the two points. through the three points.
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).
42
f1 ( x) 2 x 1 2 x
2 1
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
General nth Order Interpolation
Given any n+1 points: x0 , f ( x0 ), x1, f ( x1 ), ..., xn , f ( xn )
The polynomial that interpolates all points is:
i 1
x x j
n
f n ( x) F [ x0 , x1 ,..., xi ]
i 0 j 0
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.
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
f [ x2 ] f [ x1 ]
f [ x1 , x2 ]
x2 x1
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
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)
x y x y
1 0 2 3
2 3 1 0
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)
x 1
2 x2 1
f [ x0 , x1 , x2 ] f [ x1 , x2 , x0 ] f [ x2 , x1 , x0 ]
Example
• Find a polynomial to x f(x)
interpolate the data.
2 3
4 5
5 1
6 6
7 9
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)
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