Sunteți pe pagina 1din 11

05.02.

1





Chapter 05.03
Newtons Divided Difference Interpolation





After reading this chapter, you should be able to:
1. derive Newtons divided difference method of interpolation,
2. apply Newtons divided difference method of interpolation, and
3. apply Newtons divided difference method interpolants to find derivatives and
integrals.

What is interpolation?
Many times, data is given only at discrete points such as ( ), ,
0 0
y x ( )
1 1
, y x , ......, ( )
1 1
,
n n
y x ,
( )
n n
y x , . So, how then does one find the value of y at any other value of x ? Well, a
continuous function ( ) x f may be used to represent the 1 + n data values with ( ) x f passing
through the 1 + n points (Figure 1). Then one can find the value of y at any other value of
x . This is called interpolation.
Of course, if x falls outside the range of x for which the data is given, it is no longer
interpolation but instead is called extrapolation.
So what kind of function ( ) x f should one choose? A polynomial is a common
choice for an interpolating function because polynomials are easy to
(A) evaluate,
(B) differentiate, and
(C) integrate,
relative to other choices such as a trigonometric and exponential series.
Polynomial interpolation involves finding a polynomial of order n that passes
through the 1 + n points. One of the methods of interpolation is called Newtons divided
difference polynomial method. Other methods include the direct method and the Lagrangian
interpolation method. We will discuss Newtons divided difference polynomial method in
this chapter.

Newtons Divided Difference Polynomial Method
To illustrate this method, linear and quadratic interpolation is presented first. Then, the
general form of Newtons divided difference polynomial method is presented. To illustrate
the general form, cubic interpolation is shown in Figure 1.
05.03.2 Chapter 05.03

Figure 1 Interpolation of discrete data.

Linear Interpolation
Given ) , (
0 0
y x and ), , (
1 1
y x fit a linear interpolant through the data. Noting ) (x f y = and
) (
1 1
x f y = , assume the linear interpolant ) (
1
x f is given by (Figure 2)
) ( ) (
0 1 0 1
x x b b x f + =
Since at
0
x x = ,

0 0 0 1 0 0 0 1
) ( ) ( ) ( b x x b b x f x f = + = =
and at
1
x x = ,
) ( ) ( ) (
0 1 1 0 1 1 1
x x b b x f x f + = =
) ( ) (
0 1 1 0
x x b x f + =
giving

0 1
0 1
1
) ( ) (
x x
x f x f
b

=
So
) (
0 0
x f b =

0 1
0 1
1
) ( ) (
x x
x f x f
b

=
giving the linear interpolant as
) ( ) (
0 1 0 1
x x b b x f + =
) (
) ( ) (
) ( ) (
0
0 1
0 1
0 1
x x
x x
x f x f
x f x f

+ =

( )
0 0
, y x
( )
1 1
, y x
( )
2 2
, y x
( )
3 3
, y x
( ) x f
x
y
Newtons Divided Difference Interpolation 05.03.3

Figure 2 Linear interpolation.

Example 1
The upward velocity of a rocket is given as a function of time in Table 1 (Figure 3).

Table 1 Velocity as a function of time.
) s ( t ) m/s ( ) (t v
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67

Determine the value of the velocity at 16 = t seconds using first order polynomial
interpolation by Newtons divided difference polynomial method.
Solution
For linear interpolation, the velocity is given by
) ( ) (
0 1 0
t t b b t v + =
Since we want to find the velocity at 16 = t , and we are using a first order polynomial, we
need to choose the two data points that are closest to 16 = t that also bracket 16 = t to
evaluate it. The two points are 15 = t and 20 = t .
Then
, 15
0
= t 78 . 362 ) (
0
= t v
, 20
1
= t 35 . 517 ) (
1
= t v
gives
) (
0 0
t v b =
( )
0 0
, y x
( )
1 1
, y x
( ) x f
1
x
y

05.03.4 Chapter 05.03

78 . 362 =

0 1
0 1
1
) ( ) (
t t
t v t v
b

=

15 20
78 . 362 35 . 517

=
914 . 30 =

Figure 3 Graph of velocity vs. time data for the rocket example.
Hence
) ( ) (
0 1 0
t t b b t v + =
), 15 ( 914 . 30 78 . 362 + = t 20 15 s s t
At , 16 = t
) 15 16 ( 914 . 30 78 . 362 ) 16 ( + = v
m/s 69 . 393 =
If we expand
), 15 ( 914 . 30 78 . 362 ) ( + = t t v 20 15 s s t
we get
, 914 . 30 93 . 100 ) ( t t v + = 20 15 s s t
and this is the same expression as obtained in the direct method.

Quadratic Interpolation
Given ), , (
0 0
y x ), , (
1 1
y x and ), , (
2 2
y x fit a quadratic interpolant through the data. Noting
), (x f y = ), (
0 0
x f y = ), (
1 1
x f y = and ), (
2 2
x f y = assume the quadratic interpolant ) (
2
x f
is given by
) )( ( ) ( ) (
1 0 2 0 1 0 2
x x x x b x x b b x f + + =
Newtons Divided Difference Interpolation 05.03.5

At
0
x x = ,
) )( ( ) ( ) ( ) (
1 0 0 0 2 0 0 1 0 0 0 2
x x x x b x x b b x f x f + + = =

0
b =
) (
0 0
x f b =
At
1
x x =
) )( ( ) ( ) ( ) (
1 1 0 1 2 0 1 1 0 1 1 2
x x x x b x x b b x f x f + + = =
) ( ) ( ) (
0 1 1 0 1
x x b x f x f + =
giving

0 1
0 1
1
) ( ) (
x x
x f x f
b

=
At
2
x x =
) )( ( ) ( ) ( ) (
1 2 0 2 2 0 2 1 0 2 2 2
x x x x b x x b b x f x f + + = =
) )( ( ) (
) ( ) (
) ( ) (
1 2 0 2 2 0 2
0 1
0 1
0 2
x x x x b x x
x x
x f x f
x f x f +

+ =
Giving

0 2
0 1
0 1
1 2
1 2
2
) ( ) ( ) ( ) (
x x
x x
x f x f
x x
x f x f
b

=
Hence the quadratic interpolant is given by
) )( ( ) ( ) (
1 0 2 0 1 0 2
x x x x b x x b b x f + + =
) )( (
) ( ) ( ) ( ) (
) (
) ( ) (
) (
1 0
0 2
0 1
0 1
1 2
1 2
0
0 1
0 1
0
x x x x
x x
x x
x f x f
x x
x f x f
x x
x x
x f x f
x f

+ =


Figure 4 Quadratic interpolation.
( )
0 0
, y x
( )
1 1
, y x
( )
2 2
, y x
( ) x f
2
y
x
05.03.6 Chapter 05.03


Example 2
The upward velocity of a rocket is given as a function of time in Table 2.

Table 2 Velocity as a function of time.
) s ( t (m/s) ) (t v
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67

Determine the value of the velocity at 16 = t seconds using second order polynomial
interpolation using Newtons divided difference polynomial method.
Solution
For quadratic interpolation, the velocity is given by
) )( ( ) ( ) (
1 0 2 0 1 0
t t t t b t t b b t v + + =
Since we want to find the velocity at , 16 = t and we are using a second order polynomial, we
need to choose the three data points that are closest to 16 = t that also bracket 16 = t to
evaluate it. The three points are , 10
0
= t , 15
1
= t and 20
2
= t .
Then
, 10
0
= t 04 . 227 ) (
0
= t v
, 15
1
= t 78 . 362 ) (
1
= t v
, 20
2
= t 35 . 517 ) (
2
= t v
gives
) (
0 0
t v b =
04 . 227 =

0 1
0 1
1
) ( ) (
t t
t v t v
b

=

10 15
04 . 227 78 . 362

=
148 . 27 =

0 2
0 1
0 1
1 2
1 2
2
) ( ) ( ) ( ) (
t t
t t
t v t v
t t
t v t v
b

=

10 20
10 15
04 . 227 78 . 362
15 20
78 . 362 35 . 517

=

10
148 . 27 914 . 30
=
Newtons Divided Difference Interpolation 05.03.7

37660 . 0 =
Hence
) )( ( ) ( ) (
1 0 2 0 1 0
t t t t b t t b b t v + + =
), 15 )( 10 ( 37660 . 0 ) 10 ( 148 . 27 04 . 227 + + = t t t 20 10 s s t
At , 16 = t
) 15 16 )( 10 16 ( 37660 . 0 ) 10 16 ( 148 . 27 04 . 227 ) 16 ( + + = v
m/s 19 . 392 =
If we expand
), 15 )( 10 ( 37660 . 0 ) 10 ( 148 . 27 04 . 227 ) ( + + = t t t t v 20 10 s s t
we get

2
37660 . 0 733 . 17 05 . 12 ) ( t t t v + + = , 20 10 s s t
This is the same expression obtained by the direct method.

General Form of Newtons Divided Difference Polynomial
In the two previous cases, we found linear and quadratic interpolants for Newtons divided
difference method. Let us revisit the quadratic polynomial interpolant formula
) )( ( ) ( ) (
1 0 2 0 1 0 2
x x x x b x x b b x f + + =
where
) (
0 0
x f b =

0 1
0 1
1
) ( ) (
x x
x f x f
b

=

0 2
0 1
0 1
1 2
1 2
2
) ( ) ( ) ( ) (
x x
x x
x f x f
x x
x f x f
b

=
Note that ,
0
b ,
1
b and
2
b are finite divided differences. ,
0
b ,
1
b and
2
b are the first, second,
and third finite divided differences, respectively. We denote the first divided difference by
) ( ] [
0 0
x f x f =
the second divided difference by

0 1
0 1
0 1
) ( ) (
] , [
x x
x f x f
x x f

=
and the third divided difference by

0 2
0 1 1 2
0 1 2
] , [ ] , [
] , , [
x x
x x f x x f
x x x f

=

0 2
0 1
0 1
1 2
1 2
) ( ) ( ) ( ) (
x x
x x
x f x f
x x
x f x f

=
where ], [
0
x f ], , [
0 1
x x f and ] , , [
0 1 2
x x x f are called bracketed functions of their variables
enclosed in square brackets.
Rewriting,
) )( ]( , , [ ) ]( , [ ] [ ) (
1 0 0 1 2 0 0 1 0 2
x x x x x x x f x x x x f x f x f + + =
05.03.8 Chapter 05.03

This leads us to writing the general form of the Newtons divided difference polynomial for
1 + n data points, ( ) ( ) ( ) ( )
n n n n
y x y x y x y x , , , ,......, , , ,
1 1 1 1 0 0
, as
) )...( )( ( .... ) ( ) (
1 1 0 0 1 0
+ + + =
n n n
x x x x x x b x x b b x f
where
] [
0 0
x f b =
] , [
0 1 1
x x f b =
] , , [
0 1 2 2
x x x f b =


] ,...., , [
0 2 1 1
x x x f b
n n n
=
] ,...., , [
0 1
x x x f b
n n n
=
where the definition of the
th
m divided difference is
] ,........, [
0
x x f b
m m
=

0
0 1 1
] ,........, [ ] ,........, [
x x
x x f x x f
m
m m

=


From the above definition, it can be seen that the divided differences are calculated
recursively.
For an example of a third order polynomial, given ), , (
0 0
y x ), , (
1 1
y x ), , (
2 2
y x and ), , (
3 3
y x
) )( )( ]( , , , [
) )( ]( , , [ ) ]( , [ ] [ ) (
2 1 0 0 1 2 3
1 0 0 1 2 0 0 1 0 3
x x x x x x x x x x f
x x x x x x x f x x x x f x f x f
+
+ + =



Figure 5 Table of divided differences for a cubic polynomial.

Example 3
The upward velocity of a rocket is given as a function of time in Table 3.


( )
0 0
x f x
0
b
( )
1 1
x f x
( )
2 2
x f x
( )
3 3
x f x
1
b
2
b
3
b
| |
0 1
, x x f
| |
1 2
, x x f
| |
2 3
, x x f
| |
0 1 2
, , x x x f
| |
1 2 3
, , x x x f
| |
0 1 2 3
, , , x x x x f
Newtons Divided Difference Interpolation 05.03.9


Table 3 Velocity as a function of time.
(s) t (m/s) ) (t v
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67

a) Determine the value of the velocity at 16 = t seconds with third order polynomial
interpolation using Newtons divided difference polynomial method.
b) Using the third order polynomial interpolant for velocity, find the distance covered by the
rocket from s 11 = t to s 16 = t .
c) Using the third order polynomial interpolant for velocity, find the acceleration of the
rocket at s 16 = t .
Solution
a) For a third order polynomial, the velocity is given by
) )( )( ( ) )( ( ) ( ) (
2 1 0 3 1 0 2 0 1 0
t t t t t t b t t t t b t t b b t v + + + =
Since we want to find the velocity at , 16 = t and we are using a third order polynomial, we
need to choose the four data points that are closest to 16 = t that also bracket 16 = t to
evaluate it. The four data points are , 10
0
= t , 15
1
= t , 20
2
= t and 5 . 22
3
= t .
Then
, 10
0
= t 04 . 227 ) (
0
= t v
, 15
1
= t 78 . 362 ) (
1
= t v
, 20
2
= t 35 . 517 ) (
2
= t v
, 5 . 22
3
= t 97 . 602 ) (
3
= t v
gives
] [
0 0
t v b =
) (
0
t v =
04 . 227 =
] , [
0 1 1
t t v b =

0 1
0 1
) ( ) (
t t
t v t v

=

10 15
04 . 227 78 . 362

=
148 . 27 =
] , , [
0 1 2 2
t t t v b =

0 2
0 1 1 2
] , [ ] , [
t t
t t v t t v

=
05.03.10 Chapter 05.03

1 2
1 2
1 2
) ( ) (
] , [
t t
t v t v
t t v

=

15 20
78 . 362 35 . 517

=
914 . 30 =
148 . 27 ] , [
0 1
= t t v
0 2
0 1 1 2
2
] , [ ] , [
t t
t t v t t v
b

=

10 20
148 . 27 914 . 30

=
37660 . 0 =
] , , , [
0 1 2 3 3
t t t t v b =

0 3
0 1 2 1 2 3
] , , [ ] , , [
t t
t t t v t t t v

=
1 3
1 2 2 3
1 2 3
] , [ ] , [
] , , [
t t
t t v t t v
t t t v

=
2 3
2 3
2 3
) ( ) (
] , [
t t
t v t v
t t v

=

20 5 . 22
35 . 517 97 . 602

=
248 . 34 =
1 2
1 2
1 2
) ( ) (
] , [
t t
t v t v
t t v

=

15 20
78 . 362 35 . 517

=
914 . 30 =
1 3
1 2 2 3
1 2 3
] , [ ] , [
] , , [
t t
t t v t t v
t t t v

=

15 5 . 22
914 . 30 248 . 34

=
44453 . 0 =
37660 . 0 ] , , [
0 1 2
= t t t v

0 3
0 1 2 1 2 3
3
] , , [ ] , , [
t t
t t t v t t t v
b

=

10 5 . 22
37660 . 0 44453 . 0

=

3
10 4347 . 5

=
Hence
) )( )( ( ) )( ( ) ( ) (
2 1 0 3 1 0 2 0 1 0
t t t t t t b t t t t b t t b b t v + + + =
Newtons Divided Difference Interpolation 05.03.11


) 20 )( 15 )( 10 ( 10 5347 . 5
) 15 )( 10 ( 37660 . 0 ) 10 ( 148 . 27 04 . 227
3
+
+ + =

t t t
t t t

At , 16 = t

) 20 16 )( 15 16 )( 10 16 ( 10 5347 . 5
) 15 16 )( 10 16 ( 37660 . 0 ) 10 16 ( 148 . 27 04 . 227 ) 16 (
3
+
+ + =

v

m/s 06 . 392 =
b) The distance covered by the rocket between s 11 = t and s 16 = t can be calculated from
the interpolating polynomial

) 20 )( 15 )( 10 ( 10 5347 . 5
) 15 )( 10 ( 37660 . 0 ) 10 ( 148 . 27 04 . 227 ) (
3
+
+ + =

t t t
t t t t v

, 0054347 . 0 13204 . 0 265 . 21 2541 . 4
3 2
t t t + + + = 5 . 22 10 s s t
Note that the polynomial is valid between 10 = t and 22.5 = t and hence includes the limits
of 11 = t and 16 = t .
So
( ) ( ) ( )
}
=
16
11
11 16 dt t v s s
dt t t t ) 0054347 . 0 13204 . 0 265 . 21 2541 . 4 (
3 2
16
11
+ + + =
}


16
11
4 3 2
4
0054347 . 0
3
13204 . 0
2
265 . 21 2541 . 4
(

+ + + =
t t t
t
m 1605 =
c) The acceleration at 16 = t is given by

16
) ( ) 16 (
=
=
t
t v
dt
d
a
) ( ) ( t v
dt
d
t a =
( )
3 2
0054347 . 0 13204 . 0 265 . 21 2541 . 4 t t t
dt
d
+ + + =

2
016304 . 0 26408 . 0 265 . 21 t t + + =

2
) 16 ( 016304 . 0 ) 16 ( 26408 . 0 265 . 21 ) 16 ( + + = a

2
m/s 664 . 29 =

INTERPOLATION
Topic Newtons Divided Difference Interpolation
Summary Textbook notes on Newtons divided difference interpolation.
Major General Engineering
Authors Autar Kaw, Michael Keteltas
Last Revised December 23, 2009
Web Site http://numericalmethods.eng.usf.edu

S-ar putea să vă placă și