Numerical Analysis: Prof. Dr. Süheyla ÇEHRELİ
Numerical Analysis: Prof. Dr. Süheyla ÇEHRELİ
10
INTERPOLATİON
Estimation of intermediate values between precise data
points.
The most common method used for this purpose is
polynomial interpolation. Recall, that the general
formula for an nth order polinom is;
f(x)=a0+a1x+a2x2+…….+anxn
For n+1 data points, there is one and only one
polynomial of order n that passes through all the points.
INTERPOLATİON
r 1 r 1
yi yi 1 yi
r
k 1 k 1
yi
k
yi yi 1 ,
i n, (n 1),..., k
NEWTON’S FORWARD DIFFERENCE INTERPOLATION
FORMULA
E f ( x) f ( x ph).
p
f ( x0 ph) E f ( x0 ) (1 ) f ( x0 )
p p
p ( p 1) 2 p ( p 1)( p 2) 3
1 p f ( x0 )
2! 3!
NEWTON’S FORWARD DIFFERENCE INTERPOLATION FORMULA
f ( x0 ph) f ( x0 ) pf ( x0 )
p ( p 1) 2 p ( p 1)( p 2) 3
f ( x0 ) f ( x0 )
2! 3!
p ( p 1) ( p n 1) n
f ( x0 ) Error
n!
p( p 1) 2
y x yn pyn yn
2!
p( p 1)( p 2) 3
yn
3!
p( p 1)( p 2) ( p n 1) n
yn Error
n!
EXP 10-1: Calculate y at x=1,1 by the Newton
forward difference polynomial.
x y
1,0 0,7651977
1,3 0,6200860
1,6 0,4554022
1,9 0,2818186
2,2 0,1103623
EXP 10-2: Calculate y at x=2 by the Newton
backward difference polynomial.
LAGRANGE INTERPOLATION FORMULA
The Lagrange interpolating polynomial is simply a
reformulation of the Newton’s polynomial that avoids
the computation of divided differences:
n
yp ( x) Li ( x) yi
i0
n x xj
Li ( x)
j 0 xi x j
j i
LAGRANGE INTERPOLATION FORMULA
x x1 x x0
y p ( x) y0 y1
x0 x1 x1 x0
y p ( x)
x x1 x x2
y0
x x0 x x2
y1
x0 x1 x0 x 2 x1 x0 x1 x 2
x x0 x x1
y2
x2 x0 x2 x1
EXP 10-3: Find Lagrange’s interpolation polynomial fitting
the data points. Hence find y (4,5).
x y
1 -1
3 7
6 34