Академический Документы
Профессиональный Документы
Культура Документы
f ( x) a0 a1 x a2 x 2 an x n
1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 18.1
2
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure
18.2
A
a
B
Newton’s Divided-Difference
Interpolating Polynomials
Linear Interpolation/
• Is the simplest form of interpolation, connecting two data
points with a straight line.
=A
Slope and a
=a finite divided
f1 ( x) f ( x0 ) f ( x1 ) f ( x0 ) difference
approximation to
x x0 x1 x0 1st derivative
=b
f ( x1 ) f ( x0 )
f1 ( x) f ( x0 ) ( x x0 ) Linear-interpolation
x1 x0 formula
f 2 ( x) b0 b1 ( x x0 ) b2 ( x x0 )( x x1 )
Chapter 18 6
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
x x0 b0 f ( x0 )
f ( x1 ) f ( x0 ) 0.954243 0.9030900
b1 0.051153
x1 x0 9 8
f ( x2 ) f ( x1 ) f ( x1 ) f ( x0 )
= b1
x2 x1 x1 x0
b2
x2 x0
1.041393 0.954243
0.051153
11 9
0.0025258
11 8
7
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
f 2 ( x) b0 b1 ( x x0 ) b2 ( x x0 )( x x1 )
Substitute;
Chapter 18 8
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
General Form of Newton’s Interpolating Polynomials/
f n ( x) f ( x0 ) (x x0 ) f [ x1 , x0 ] (x x0 )( x x1 ) f [ x2 , x1 , x0 ]
(x x0 )( x x1 ) ( x xn 1 ) f [ xn , xn 1 , , x0 ]
b0 f ( x0 )
b1 f [ x1 , x0 ]
b2 f [ x2 , x1 , x0 ]
bn f [ xn , xn 1 , , x1 , x0 ]
f ( xi ) f (x j )
f [ xi , x j ] Bracketed function
xi xj
evaluations are finite
f [ xi , x j ] f [ x j , xk ] divided differences
f [ xi , x j , xk ]
xi xk
f [ xn , xn 1 , , x1 ] f [ xn 1 , xn 2 , , x0 ]
f [ xn , xn 1 , , x1 , x0 ]
xn x0
9
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
11
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Slopes or
gradient
12
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
f [x2, x1, x0]
f [x1, x0]
f [ x 3 , x2 , x 1 , x 0 ]
13
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Given data:
Calculate f(2.8) using Newton’s interpolating
polynomial of order 1 through 2.
f(x) 2 8 14 15 8 2
14
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
First, order the points so that they are as
close to and as centered about the unknown
as possible
• x0 = 2.5 f(x0) = 14
• x1 = 3.2 f(x1) = 15
• x2 = 2 f(x2) = 8
• x3 = 4 f(x3) = 8
• x4 = 1.6 f(x4) = 2
15
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Next, the divided differences can be computed and displayed.
The first through third-order interpolations can then be implemented as:
17
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.