0% found this document useful (0 votes)
20 views15 pages

Na 10

Uploaded by

Ezgi Geyik
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)
20 views15 pages

Na 10

Uploaded by

Ezgi Geyik
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/ 15

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

 Newton’s Forward Difference Interpolation Formula

 Newton’s Backward Difference Interpolation Formula

 Lagrange Interpolation Formula


FORWARD AND BACKWARD DİFFERENCE

r 1 r 1
 yi  
r
yi 1   yi
k 1 k 1
 yi  
k
yi   yi 1 ,
i  n, (n  1),..., k
NEWTON’S FORWARD DİFFERENCE INTERPOLATİON
FORMULA

 Let y = f (x) be a function which takes values f


(x0), f (x0+ h), f (x0+2h), …, corresponding to
various equi-spaced values of x with spacing h,
say x0, x0 + h, x0 + 2h, … .
Suppose, we wish to evaluate the function f (x)
for a value x0 + ph, where p is any real number,
then for any real number p, we have the
operator E such that
NEWTON’S FORWARD DİFFERENCE INTERPOLATİON 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 DİFFERENCE INTERPOLATİON FORMULA

f ( x0  ph)  f ( x0 )  pf ( 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!

This is known as Newton’s forward


difference formula for interpolation,
which gives the value of f (x0 + ph) in
terms of f (x0) and its leading differences.
NEWTON’S FORWARD DİFFERENCE INTERPOLATİON FORMULA
 This formula is also known as Newton-Gregory forward
difference interpolation formula. Here p=(x-x0)/h.
An alternate expression is

p( p  1) 2
yx  y0  py0   y0
2!
p( p  1)( p  2) 3
  y0 
3!
p( p  1)( p  n  1) n
  y0  Error
n!
NEWTON’S BACKWARD DİFFERENCE INTERPOLATİON
FORMULA

 Forinterpolating the value of the function y = f (x)


near the end of table of values, and to extrapolate
value of the function a short distance forward from yn,
Newton’s backward interpolation formula is used

p( p  1) 2
yx  yn  pyn   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 INTERPOLATİON 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
i0
n x  xj
Li ( x)  
j 0 xi  x j
j i
LAGRANGE INTERPOLATİON 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

(3 data points 2nd order polynomial!!!)


 EXP 10-4: Find Lagrange’s interpolation polynomial fitting
the points y(1) = -3, y(3) = 0, y(4) = 30, y(6) = 132. Hence
find y(5).

The given data can be arranged as

You might also like