1
Newton’s Divided Difference Polynomial
Method of Interpolation
http://numericalmethods.eng.usf.edu2
Newton’s Divided Difference Method
Linear interpolation: Given pass a linear interpolant through the data
where
),,( 00 yx ),,( 11 yx
)()( 0101 xxbbxf
)( 00 xfb
01
011
)()(
xx
xfxfb
3
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.
t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Table 1: Velocity as a function of time
Figure 2: Velocity vs. time data for the rocket example
http://numericalmethods.eng.usf.edu4
Linear Interpolation
10 12 14 16 18 20 22 24350
400
450
500
550517.35
362.78
y s
f range( )
f x desired
x s1
10x s0
10 x s range x desired
,150 t 78.362)( 0 tv
,201 t 35.517)( 1 tv
)( 00 tvb 78.362
01
011
)()(
tt
tvtvb
914.30
)()( 010 ttbbtv
http://numericalmethods.eng.usf.edu5
Linear Interpolation (contd)
10 12 14 16 18 20 22 24350
400
450
500
550517.35
362.78
y s
f range( )
f x desired
x s1
10x s0
10 x s range x desired
)()( 010 ttbbtv
),15(914.3078.362 t 2015 t
At 16t
)1516(914.3078.362)16( v
69.393 m/s
http://numericalmethods.eng.usf.edu6
Quadratic InterpolationGiven ),,( 00 yx ),,( 11 yx and ),,( 22 yx fit a quadratic interpolant through the data.
))(()()( 1020102 xxxxbxxbbxf
)( 00 xfb
01
011
)()(
xx
xfxfb
02
01
01
12
12
2
)()()()(
xx
xx
xfxf
xx
xfxf
b
7
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.
t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Table 1: Velocity as a function of time
Figure 2: Velocity vs. time data for the rocket example
8
Quadratic Interpolation (contd)
0104.203.0 623 xxxxf10 12 14 16 18 20
200
250
300
350
400
450
500
550517.35
227.04
y s
f range( )
f x desired
2010 x s range x desired
,100 t 04.227)( 0 tv
,151 t 78.362)( 1 tv
,202 t 35.517)( 2 tv
http://numericalmethods.eng.usf.edu9
Quadratic Interpolation (contd)
)( 00 tvb
04.227
01
011
)()(
tt
tvtvb
1015
04.22778.362
148.27
02
01
01
12
12
2
)()()()(
tt
tt
tvtv
tt
tvtv
b
1020
1015
04.22778.362
1520
78.36235.517
10
148.27914.30
37660.0
10
Quadratic Interpolation (contd)
))(()()( 102010 ttttbttbbtv
),15)(10(37660.0)10(148.2704.227 ttt 2010 t
At ,16t
)1516)(1016(37660.0)1016(148.2704.227)16( v 19.392 m/s
The absolute relative approximate error a obtained between the results from the first
order and second order polynomial is
a 100x19.392
69.39319.392
= 0.38502 %
http://numericalmethods.eng.usf.edu11
General Form
))(()()( 1020102 xxxxbxxbbxf
where
Rewriting))(](,,[)](,[][)( 1001200102 xxxxxxxfxxxxfxfxf
)(][ 000 xfxfb
01
01011
)()(],[
xx
xfxfxxfb
02
01
01
12
12
02
01120122
)()()()(
],[],[],,[
xx
xx
xfxf
xx
xfxf
xx
xxfxxfxxxfb
12
General FormGiven )1( n data points, nnnn yxyxyxyx ,,,,......,,,, 111100 as
))...()((....)()( 110010 nnn xxxxxxbxxbbxf
where
][ 00 xfb
],[ 011 xxfb
],,[ 0122 xxxfb
],....,,[ 0211 xxxfb nnn
],....,,[ 01 xxxfb nnn
http://numericalmethods.eng.usf.edu13
General formThe third order polynomial, given ),,( 00 yx ),,( 11 yx ),,( 22 yx and ),,( 33 yx is
))()(](,,,[
))(](,,[)](,[][)(
2100123
1001200103
xxxxxxxxxxf
xxxxxxxfxxxxfxfxf
0b
0x )( 0xf 1b
],[ 01 xxf 2b
1x )( 1xf ],,[ 012 xxxf 3b
],[ 12 xxf ],,,[ 0123 xxxxf
2x )( 2xf ],,[ 123 xxxf
],[ 23 xxf
3x )( 3xf
14
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.
t v(t)
s m/s
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Table 1: Velocity as a function of time
Figure 2: Velocity vs. time data for the rocket example
http://numericalmethods.eng.usf.edu15
Example
The velocity profile is chosen as))()(())(()()( 2103102010 ttttttbttttbttbbtv
we need to choose four data points that are closest to 16t
,100 t 04.227)( 0 tv
,151 t 78.362)( 1 tv ,202 t 35.517)( 2 tv ,5.223 t 97.602)( 3 tv
The values of the constants are found as : b0 = 227.04; b1 = 27.148; b2 = 0.37660; b3 = 5.4347*10-3
16
Example
b0 = 227.04; b1 = 27.148; b2 = 0.37660; b3 = 5.4347*10-3
0b
100 t 04.227 1b
148.27 2b
,151 t 78.362 37660.0 3b
914.30 3104347.5 x
,202 t 35.517 44453.0
248.34
,5.223 t 97.602
http://numericalmethods.eng.usf.edu17
ExampleHence
))()(())(()()( 2103102010 ttttttbttttbttbbtv
)20)(15)(10(10*4347.5
)15)(10(37660.0)10(148.2704.2273
ttt
ttt
At ,16t
)2016)(1516)(1016(10*4347.5
)1516)(1016(37660.0)1016(148.2704.227)16(3
v
06.392 m/s
The absolute relative approximate error a obtained is
a 100x06.392
19.39206.392
= 0.033427 %
http://numericalmethods.eng.usf.edu18
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 %
Latihan
Misalkan Nilai-nilai fungsi seperti pada tabel berikut, tentukanlah nilai aproksimasi dari f(0,1), f(0,35), dan f(1,16) berturut-turut menggunakan interpolasi beda terbagi Newton linear, kuadratik, kubik.
x f(x)
0,0 0,000
0,2 0,406
0,4 0,846
0,6 1,368
0,8 2,060
1,0 3,114
1,2 5,114
20
Distance from Velocity Profile
Find the distance covered by the rocket from t=11s tot=16s ?
)20)(15)(10(10*4347.5
)15)(10(37660.0)10(148.2704.227)(3
ttt
ttttv 5.2210 t
32 0054347.013204.0265.212541.4 ttt 5.2210 t So
16
11
1116 dttvss
dtttt )0054347.013204.0265.212541.4( 3216
11
16
11
432
40054347.0
313204.0
2265.212541.4
tttt
m 1605
21
Acceleration from Velocity Profile
Find the acceleration of the rocket at t=16s given that
32 0054347.013204.0265.212541.4)( ttttv
32 0054347.013204.0265.212541.4)()( tttdt
dtv
dt
dta
2016304.026408.0265.21 tt
2)16(016304.0)16(26408.0265.21)16( a
2/ 664.29 sm