by Lale Yurttas, Texas A
&M University
Chapter 18 1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Interpolation
Chapter 18
• Estimation of intermediate values between precise
data points. The most common method is:
• Although there is one and only one nth-order
polynomial that fits n+1 points, there are a variety of
mathematical formats in which this polynomial can be
expressed:
– The Newton polynomial
– The Lagrange polynomial
n
n x
a
x
a
x
a
a
x
f 



 
2
2
1
0
)
(
by Lale Yurttas, Texas A
&M University
Chapter 18 2
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.1
by Lale Yurttas, Texas A
&M University
Chapter 18 3
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Newton’s Divided-Difference
Interpolating Polynomials
Linear Interpolation/
• Is the simplest form of interpolation, connecting two data
points with a straight line.
• f1(x) designates that this is a first-order interpolating
polynomial.
)
(
)
(
)
(
)
(
)
(
)
(
)
(
)
(
)
(
0
0
0
1
0
1
0
0
1
0
0
1
x
x
x
x
x
f
x
f
x
f
x
f
x
x
x
f
x
f
x
x
x
f
x
f










Linear-interpolation
formula
Slope and a
finite divided
difference
approximation to
1st
derivative
by Lale Yurttas, Texas A
&M University
Chapter 18 4
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure
18.2
by Lale Yurttas, Texas A
&M University
Chapter 18 5
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Quadratic Interpolation/
• If three data points are available, the estimate is
improved by introducing some curvature into the line
connecting the points.
• A simple procedure can be used to determine the
values of the coefficients.
)
)(
(
)
(
)
( 1
0
2
0
1
0
2 x
x
x
x
b
x
x
b
b
x
f 





0
2
0
1
0
1
1
2
1
2
2
2
0
0
1
1
1
0
0
0
)
(
)
(
)
(
)
(
)
(
)
(
)
(
x
x
x
x
x
f
x
f
x
x
x
f
x
f
b
x
x
x
x
x
f
x
f
b
x
x
x
f
b
x
x














by Lale Yurttas, Texas A
&M University
Chapter 18 6
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
General Form of Newton’s Interpolating Polynomials/
0
0
2
1
1
1
0
1
1
0
1
1
0
1
2
2
0
1
1
0
0
0
1
1
1
0
0
1
2
1
0
0
1
0
0
]
,
,
,
[
]
,
,
,
[
]
,
,
,
,
[
]
,
[
]
,
[
]
,
,
[
)
(
)
(
]
,
[
]
,
,
,
,
[
]
,
,
[
]
,
[
)
(
]
,
,
,
[
)
(
)
)(
(
]
,
,
[
)
)(
(
]
,
[
)
(
)
(
)
(
x
x
x
x
x
f
x
x
x
f
x
x
x
x
f
x
x
x
x
f
x
x
f
x
x
x
f
x
x
x
f
x
f
x
x
f
x
x
x
x
f
b
x
x
x
f
b
x
x
f
b
x
f
b
x
x
x
f
x
x
x
x
x
x
x
x
x
f
x
x
x
x
x
x
f
x
x
x
f
x
f
n
n
n
n
n
n
n
k
i
k
j
j
i
k
j
i
j
i
j
i
j
i
n
n
n
n
n
n
n








































Bracketed function
evaluations are finite
divided differences
by Lale Yurttas, Texas A
&M University
Chapter 18 7
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Errors of Newton’s Interpolating Polynomials/
• Structure of interpolating polynomials is similar to the Taylor
series expansion in the sense that finite divided differences are
added sequentially to capture the higher order derivatives.
• For an nth
-order interpolating polynomial, an analogous
relationship for the error is:
• For non differentiable functions, if an additional point f(xn+1) is
available, an alternative formula can be used that does not
require prior knowledge of the function:
)
(
)
)(
(
)!
1
(
)
(
1
0
)
1
(
n
n
n x
x
x
x
x
x
n
f
R 







)
(
)
)(
](
,
,
,
,
[ 1
0
0
1
1 n
n
n
n
n x
x
x
x
x
x
x
x
x
x
f
R 


 
 

Is somewhere
containing the unknown
and he data
by Lale Yurttas, Texas A
&M University
Chapter 18 8
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lagrange Interpolating Polynomials
• The Lagrange interpolating polynomial is simply a
reformulation of the Newton’s polynomial that
avoids the computation of divided differences:









n
i
j
j j
i
j
i
n
i
i
i
n
x
x
x
x
x
L
x
f
x
L
x
f
0
0
)
(
)
(
)
(
)
(
by Lale Yurttas, Texas A
&M University
Chapter 18 9
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
  
  
  
  
  
  
)
(
)
(
)
(
)
(
)
(
)
(
)
(
2
1
2
0
2
1
0
1
2
1
0
1
2
0
0
2
0
1
0
2
1
2
1
0
1
0
0
1
0
1
1
x
f
x
x
x
x
x
x
x
x
x
f
x
x
x
x
x
x
x
x
x
f
x
x
x
x
x
x
x
x
x
f
x
f
x
x
x
x
x
f
x
x
x
x
x
f





















•As with Newton’s method, the Lagrange version has an
estimated error of:


 

n
i
i
n
n
n x
x
x
x
x
x
f
R
0
0
1 )
(
]
,
,
,
,
[ 
by Lale Yurttas, Texas A
&M University
Chapter 18 10
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.10
by Lale Yurttas, Texas A
&M University
Chapter 18 11
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Coefficients of an Interpolating
Polynomial
• Although both the Newton and Lagrange
polynomials are well suited for determining
intermediate values between points, they do not
provide a polynomial in conventional form:
• Since n+1 data points are required to determine n+1
coefficients, simultaneous linear systems of
equations can be used to calculate “a”s.
n
x x
a
x
a
x
a
a
x
f 



 
2
2
1
0
)
(
by Lale Yurttas, Texas A
&M University
Chapter 18 12
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
n
n
n
n
n
n
n
n
n
n
x
a
x
a
x
a
a
x
f
x
a
x
a
x
a
a
x
f
x
a
x
a
x
a
a
x
f
















2
2
1
0
1
2
1
2
1
1
0
1
0
2
0
2
0
1
0
0
)
(
)
(
)
(
Where “x”s are the knowns and “a”s are the unknowns.
by Lale Yurttas, Texas A
&M University
Chapter 18 13
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.13
by Lale Yurttas, Texas A
&M University
Chapter 18 14
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Spline Interpolation
• There are cases where polynomials can lead to
erroneous results because of round off error
and overshoot.
• Alternative approach is to apply lower-order
polynomials to subsets of data points. Such
connecting polynomials are called spline
functions.
by Lale Yurttas, Texas A
&M University
Chapter 18 15
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.14
by Lale Yurttas, Texas A
&M University
Chapter 18 16
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.15
by Lale Yurttas, Texas A
&M University
Chapter 18 17
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.16
by Lale Yurttas, Texas A
&M University
Chapter 18 18
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.17

Chap_18.ppt on interpolation basics undersatanding

  • 1.
    by Lale Yurttas,Texas A &M University Chapter 18 1 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Interpolation Chapter 18 • Estimation of intermediate values between precise data points. The most common method is: • Although there is one and only one nth-order polynomial that fits n+1 points, there are a variety of mathematical formats in which this polynomial can be expressed: – The Newton polynomial – The Lagrange polynomial n n x a x a x a a x f       2 2 1 0 ) (
  • 2.
    by Lale Yurttas,Texas A &M University Chapter 18 2 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.1
  • 3.
    by Lale Yurttas,Texas A &M University Chapter 18 3 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Newton’s Divided-Difference Interpolating Polynomials Linear Interpolation/ • Is the simplest form of interpolation, connecting two data points with a straight line. • f1(x) designates that this is a first-order interpolating polynomial. ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( 0 0 0 1 0 1 0 0 1 0 0 1 x x x x x f x f x f x f x x x f x f x x x f x f           Linear-interpolation formula Slope and a finite divided difference approximation to 1st derivative
  • 4.
    by Lale Yurttas,Texas A &M University Chapter 18 4 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.2
  • 5.
    by Lale Yurttas,Texas A &M University Chapter 18 5 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Quadratic Interpolation/ • If three data points are available, the estimate is improved by introducing some curvature into the line connecting the points. • A simple procedure can be used to determine the values of the coefficients. ) )( ( ) ( ) ( 1 0 2 0 1 0 2 x x x x b x x b b x f       0 2 0 1 0 1 1 2 1 2 2 2 0 0 1 1 1 0 0 0 ) ( ) ( ) ( ) ( ) ( ) ( ) ( x x x x x f x f x x x f x f b x x x x x f x f b x x x f b x x              
  • 6.
    by Lale Yurttas,Texas A &M University Chapter 18 6 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. General Form of Newton’s Interpolating Polynomials/ 0 0 2 1 1 1 0 1 1 0 1 1 0 1 2 2 0 1 1 0 0 0 1 1 1 0 0 1 2 1 0 0 1 0 0 ] , , , [ ] , , , [ ] , , , , [ ] , [ ] , [ ] , , [ ) ( ) ( ] , [ ] , , , , [ ] , , [ ] , [ ) ( ] , , , [ ) ( ) )( ( ] , , [ ) )( ( ] , [ ) ( ) ( ) ( x x x x x f x x x f x x x x f x x x x f x x f x x x f x x x f x f x x f x x x x f b x x x f b x x f b x f b x x x f x x x x x x x x x f x x x x x x f x x x f x f n n n n n n n k i k j j i k j i j i j i j i n n n n n n n                                         Bracketed function evaluations are finite divided differences
  • 7.
    by Lale Yurttas,Texas A &M University Chapter 18 7 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Errors of Newton’s Interpolating Polynomials/ • Structure of interpolating polynomials is similar to the Taylor series expansion in the sense that finite divided differences are added sequentially to capture the higher order derivatives. • For an nth -order interpolating polynomial, an analogous relationship for the error is: • For non differentiable functions, if an additional point f(xn+1) is available, an alternative formula can be used that does not require prior knowledge of the function: ) ( ) )( ( )! 1 ( ) ( 1 0 ) 1 ( n n n x x x x x x n f R         ) ( ) )( ]( , , , , [ 1 0 0 1 1 n n n n n x x x x x x x x x x f R         Is somewhere containing the unknown and he data
  • 8.
    by Lale Yurttas,Texas A &M University Chapter 18 8 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Lagrange Interpolating Polynomials • The Lagrange interpolating polynomial is simply a reformulation of the Newton’s polynomial that avoids the computation of divided differences:          n i j j j i j i n i i i n x x x x x L x f x L x f 0 0 ) ( ) ( ) ( ) (
  • 9.
    by Lale Yurttas,Texas A &M University Chapter 18 9 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.                   ) ( ) ( ) ( ) ( ) ( ) ( ) ( 2 1 2 0 2 1 0 1 2 1 0 1 2 0 0 2 0 1 0 2 1 2 1 0 1 0 0 1 0 1 1 x f x x x x x x x x x f x x x x x x x x x f x x x x x x x x x f x f x x x x x f x x x x x f                      •As with Newton’s method, the Lagrange version has an estimated error of:      n i i n n n x x x x x x f R 0 0 1 ) ( ] , , , , [ 
  • 10.
    by Lale Yurttas,Texas A &M University Chapter 18 10 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.10
  • 11.
    by Lale Yurttas,Texas A &M University Chapter 18 11 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Coefficients of an Interpolating Polynomial • Although both the Newton and Lagrange polynomials are well suited for determining intermediate values between points, they do not provide a polynomial in conventional form: • Since n+1 data points are required to determine n+1 coefficients, simultaneous linear systems of equations can be used to calculate “a”s. n x x a x a x a a x f       2 2 1 0 ) (
  • 12.
    by Lale Yurttas,Texas A &M University Chapter 18 12 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. n n n n n n n n n n x a x a x a a x f x a x a x a a x f x a x a x a a x f                 2 2 1 0 1 2 1 2 1 1 0 1 0 2 0 2 0 1 0 0 ) ( ) ( ) ( Where “x”s are the knowns and “a”s are the unknowns.
  • 13.
    by Lale Yurttas,Texas A &M University Chapter 18 13 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.13
  • 14.
    by Lale Yurttas,Texas A &M University Chapter 18 14 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Spline Interpolation • There are cases where polynomials can lead to erroneous results because of round off error and overshoot. • Alternative approach is to apply lower-order polynomials to subsets of data points. Such connecting polynomials are called spline functions.
  • 15.
    by Lale Yurttas,Texas A &M University Chapter 18 15 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.14
  • 16.
    by Lale Yurttas,Texas A &M University Chapter 18 16 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.15
  • 17.
    by Lale Yurttas,Texas A &M University Chapter 18 17 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.16
  • 18.
    by Lale Yurttas,Texas A &M University Chapter 18 18 Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Figure 18.17