Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft...

42
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 18 1 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 + + + + = L 2 2 1 0 ) (

Transcript of Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft...

Page 1: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 1

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

nxaxaxaaxf ++++= L2

210)(

Page 2: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 2

Figure 18.1

Page 3: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 3

Figure

18.2

Page 4: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 4

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

01

0101

01

01

0

01

xxxx

xfxfxfxf

xx

xfxf

xx

xfxf

−−

−+=

−=

Linear-interpolation

formula

Slope and a

finite divided

difference

approximation to

1st derivative

Page 5: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 5

Page 6: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 6

Page 7: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

7

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.

))(()()( 1020102 xxxxbxxbbxf −−+−+=

02

01

01

12

12

22

01

0111

000

)()()()(

)()(

)(

xx

xx

xfxf

xx

xfxf

bxx

xx

xfxfbxx

xfbxx

−−

==

−==

==

Page 8: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 8

Page 9: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

by Lale Yurttas, Texas

A&M University

Chapter 18 9

Page 10: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 10

General Form of Newton’s Interpolating Polynomials/

0

02111011

011

0122

011

00

01110

012100100

],,,[],,,[],,,,[

],[],[],,[

)()(],[

],,,,[

],,[

],[

)(

],,,[)())((

],,[))((],[)()()(

xx

xxxfxxxfxxxxf

xx

xxfxxfxxxf

xx

xfxfxxf

xxxxfb

xxxfb

xxfb

xfb

xxxfxxxxxx

xxxfxxxxxxfxxxfxf

n

nnnnnn

ki

kjji

kji

ji

ji

ji

nnn

nnn

n

−=

−=

−=

=

=

=

=

−−−++

−−+−+=

−−−−

−−

KKK

M

L

M

LLL

Bracketed function

evaluations are finite

divided differences

Page 11: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 11

Page 12: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 12

Page 13: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 13

Page 14: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 14

Page 15: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 15

Page 16: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 16

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(

)(10

)1(

n

n

n xxxxxxn

fR −−−

+=

+

)())(](,,,,[ 10011 nnnnn xxxxxxxxxxfR −−−≅ −+ LK

ξ Is somewhere

containing the unknown

and he data

Page 17: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 17

Lagrange Interpolating Polynomials

• The Lagrange interpolating polynomial is simply a

reformulation of the Newton’s polynomial that

avoids the computation of divided differences:

≠=

=

−=

=

n

ijj ji

j

i

n

i

iin

xx

xxxL

xfxLxf

0

0

)(

)()()(

Page 18: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 18

( )( )( )( )

( )( )( )( )

( )( )( )( )

)(

)()()(

)()()(

2

1202

10

1

2101

200

2010

212

1

01

00

10

11

xfxxxx

xxxx

xfxxxx

xxxxxf

xxxx

xxxxxf

xfxx

xxxf

xx

xxxf

−−

−−+

−−

−−+

−−

−−=

−+

−=

•As with Newton’s method, the Lagrange version has an

estimated error of:

∏=

− −=n

i

innn xxxxxxfR0

01 )(],,,,[ K

Page 19: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 19

Figure 18.10

Page 20: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 20

Page 21: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 21

)()()(

)()(

)()()()(

0

01

0101

01

01

0

01

xxxx

xfxfxfxf

xx

xfxf

xx

xfxf

−−

−+=

−=

Page 22: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 22

Page 23: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 23

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

xxaxaxaaxf ++++= L2

210)(

Page 24: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 24

n

nnnnn

n

n

n

n

xaxaxaaxf

xaxaxaaxf

xaxaxaaxf

+++=

+++=

+++=

L

M

L

L

2

210

1

2

121101

0

2

020100

)(

)(

)(

Where “x”s are the knowns and “a”s are the unknowns.

Page 25: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 25

Figure 18.13

Page 26: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 26

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.

Page 27: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 27

Figure 18.14

Page 28: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 28

Figure 18.15

Page 29: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 29

Figure 18.16

Page 30: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 30

Figure 18.17

Page 31: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 31

Quadratic Splines

Page 32: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 32

Page 33: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 33

Page 34: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 34

Page 35: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 35

Cubic Splines

Page 36: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 36

Page 37: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 37

Page 38: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 38

Page 39: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 39

Page 40: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 40

Page 41: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 41

Page 42: Interpolation Chapter 18libvolume5.xyz/industrialmanagementengineering/btech/...Title Microsoft PowerPoint - NUMERICALMETHODS2Presentation2 [Compatibility Mode] Author lab21.04 Created

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 42