100% found this document useful (1 vote)
283 views25 pages

Newton's Divided Difference

This document discusses Newton's divided difference method for polynomial interpolation of data points. It begins by explaining what interpolation is and why polynomials are commonly used. It then presents the formulas for linear, quadratic, and cubic interpolation using Newton's divided difference method. Examples are provided to demonstrate finding the velocity at t=16 seconds from a set of velocity-time data points using linear, quadratic, and cubic interpolation polynomials. The cubic interpolation was found to have the lowest relative error compared to the other methods.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
283 views25 pages

Newton's Divided Difference

This document discusses Newton's divided difference method for polynomial interpolation of data points. It begins by explaining what interpolation is and why polynomials are commonly used. It then presents the formulas for linear, quadratic, and cubic interpolation using Newton's divided difference method. Examples are provided to demonstrate finding the velocity at t=16 seconds from a set of velocity-time data points using linear, quadratic, and cubic interpolation polynomials. The cubic interpolation was found to have the lowest relative error compared to the other methods.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

http://numericalmethods.eng.usf.

edu 1
Newtons Divided Difference
Polynomial Method of
Interpolation
Major: All Engineering Majors

Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM
Undergraduates


Newtons Divided
Difference Method of
Interpolation


http://numericalmethods.eng.usf.edu



http://numericalmethods.eng.usf.edu 3
What is Interpolation ?

Given (x
0
,y
0
), (x
1
,y
1
), (x
n
,y
n
), find the
value of y at a value of x that is not given.


http://numericalmethods.eng.usf.edu 4
Interpolants
Polynomials are the most common
choice of interpolants because they
are easy to:

Evaluate
Differentiate, and
Integrate.


http://numericalmethods.eng.usf.edu 5
Newtons Divided Difference
Method
Linear interpolation: Given pass a
linear interpolant through the data


where
), , (
0 0
y x ), , (
1 1
y x
) ( ) (
0 1 0 1
x x b b x f + =

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

=


http://numericalmethods.eng.usf.edu 6
Example
The upward velocity of a rocket is given as a function of
time in Table 1. Find the velocity at t=16 seconds using
the Newton Divided Difference method for linear
interpolation.



Table. Velocity as a
function of time
Figure. Velocity vs. time data
for the rocket example
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
) s ( t ) m/s ( ) (t v

http://numericalmethods.eng.usf.edu 7
Linear Interpolation
10 12 14 16 18 20 22 24
350
400
450
500
550
517.35
362.78
y
s
f range ( )
f x
desired
( )
x
s
1
10 + x
s
0
10 x
s
range , x
desired
,
, 15
0
= t 78 . 362 ) (
0
= t v
, 20
1
= t 35 . 517 ) (
1
= t v
) (
0 0
t v b = 78 . 362 =
0 1
0 1
1
) ( ) (
t t
t v t v
b

= 914 . 30 =
) ( ) (
0 1 0
t t b b t v + =

http://numericalmethods.eng.usf.edu 8
Linear Interpolation (contd)
10 12 14 16 18 20 22 24
350
400
450
500
550
517.35
362.78
y
s
f range ( )
f x
desired
( )
x
s
1
10 + x
s
0
10 x
s
range , x
desired
,
) ( ) (
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
69 . 393 = m/s

http://numericalmethods.eng.usf.edu 9
Quadratic Interpolation
Given ), , (
0 0
y x ), , (
1 1
y x and ), , (
2 2
y x fit a quadratic interpolant through the data.
) )( ( ) ( ) (
1 0 2 0 1 0 2
x x x x b x x b b x f + + =
) (
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

=

http://numericalmethods.eng.usf.edu 10
Example
The upward velocity of a rocket is given as a function of
time in Table 1. Find the velocity at t=16 seconds using
the Newton Divided Difference method for quadratic
interpolation.



Table. Velocity as a
function of time
Figure. Velocity vs. time data
for the rocket example
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
) s ( t ) m/s ( ) (t v

http://numericalmethods.eng.usf.edu 11
Quadratic Interpolation (contd)


10 12 14 16 18 20
200
250
300
350
400
450
500
550
517.35
227.04
y
s
f range ( )
f x
desired
( )
20 10 x
s
range , x
desired
,
, 10
0
= t 04 . 227 ) (
0
= t v
, 15
1
= t 78 . 362 ) (
1
= t v
, 20
2
= t 35 . 517 ) (
2
= t v

http://numericalmethods.eng.usf.edu 12
Quadratic Interpolation (contd)
) (
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
=
37660 . 0 =

http://numericalmethods.eng.usf.edu 13
Quadratic Interpolation (contd)
) )( ( ) ( ) (
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 19 . 392 = m/s
The absolute relative approximate error
a
e obtained between the results from the first
order and second order polynomial is

a
e
100 x
19 . 392
69 . 393 19 . 392
=

= 0.38502 %

http://numericalmethods.eng.usf.edu 14
General Form
) )( ( ) ( ) (
1 0 2 0 1 0 2
x x x x b x x b b x f + + =
where



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 + + =
) ( ] [
0 0 0
x f x f b = =

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

= =

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

= =

http://numericalmethods.eng.usf.edu 15
General Form
Given ) 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
=

http://numericalmethods.eng.usf.edu 16
General form
The third order polynomial, given ), , (
0 0
y x ), , (
1 1
y x ), , (
2 2
y x and ), , (
3 3
y x is


) )( )( ]( , , , [
) )( ]( , , [ ) ]( , [ ] [ ) (
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
+
+ + =


0
b
0
x ) (
0
x f
1
b
] , [
0 1
x x f
2
b
1
x ) (
1
x f ] , , [
0 1 2
x x x f
3
b
] , [
1 2
x x f ] , , , [
0 1 2 3
x x x x f
2
x ) (
2
x f ] , , [
1 2 3
x x x f
] , [
2 3
x x f
3
x ) (
3
x f


http://numericalmethods.eng.usf.edu 17
Example
The upward velocity of a rocket is given as a function of
time in Table 1. Find the velocity at t=16 seconds using
the Newton Divided Difference method for cubic
interpolation.



Table. Velocity as a
function of time
Figure. Velocity vs. time data
for the rocket example
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
) s ( t ) m/s ( ) (t v

http://numericalmethods.eng.usf.edu 18
Example

The velocity profile is chosen as

) )( )( ( ) )( ( ) ( ) (
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 + + + =
we need to choose four data points that are closest to
16 = t
, 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

The values of the constants are found as:
b
0
= 227.04; b
1
= 27.148; b
2
= 0.37660; b
3
= 5.434710
3




http://numericalmethods.eng.usf.edu 19
Example


b
0
= 227.04; b
1
= 27.148; b
2
= 0.37660; b
3
= 5.434710
3

0
b
10
0
= t 04 . 227
1
b
148 . 27
2
b
, 15
1
= t 78 . 362 37660 . 0
3
b
914 . 30
3
10 4347 . 5


, 20
2
= t 35 . 517 44453 . 0
248 . 34
, 5 . 22
3
= t 97 . 602

http://numericalmethods.eng.usf.edu 20
Example
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 + + + =

) 20 )( 15 )( 10 ( 10 * 4347 . 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 * 4347 . 5
) 15 16 )( 10 16 ( 37660 . 0 ) 10 16 ( 148 . 27 04 . 227 ) 16 (
3
+
+ + =

v

06 . 392 = m/s
The absolute relative approximate error
a
e obtained is
a
e
100 x
06 . 392
19 . 392 06 . 392
=

= 0.033427 %

http://numericalmethods.eng.usf.edu 21
Comparison Table
Order of
Polynomial
1 2 3
v(t=16)
m/s
393.69 392.19 392.06
Absolute Relative
Approximate Error
---------- 0.38502 %

0.033427 %


http://numericalmethods.eng.usf.edu 22
Distance from Velocity Profile
Find the distance covered by the rocket from t=11s to
t=16s ?


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

t t t
t t t t v
5 . 22 10 s s t

3 2
0054347 . 0 13204 . 0 265 . 21 2541 . 4 t t t + + + = 5 . 22 10 s s 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 =

http://numericalmethods.eng.usf.edu 23
Acceleration from Velocity Profile
Find the acceleration of the rocket at t=16s given that
3 2
0054347 . 0 13204 . 0 265 . 21 2541 . 4 ) ( t t t t v + + + =
( )
3 2
0054347 . 0 13204 . 0 265 . 21 2541 . 4 ) ( ) ( t t t
dt
d
t v
dt
d
t a + + + = =

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

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

2
/ 664 . 29 s m =
Additional Resources
For all resources on this topic such as digital audiovisual
lectures, primers, textbook chapters, multiple-choice
tests, worksheets in MATLAB, MATHEMATICA, MathCad
and MAPLE, blogs, related physical problems, please
visit

http://numericalmethods.eng.usf.edu/topics/newton_div
ided_difference_method.html


THE END



http://numericalmethods.eng.usf.edu

You might also like