Newton's Divided Difference Polynomial Power Point ...mathforcollege.com › nm › mws › gen ›...
Transcript of Newton's Divided Difference Polynomial Power Point ...mathforcollege.com › nm › mws › gen ›...
http://numericalmethods.eng.usf.edu 1
Newton’s Divided Difference Polynomial Method of
Interpolation
Major: All Engineering Majors
Authors: Autar Kaw, Jai Paul
http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM
Undergraduates
Newton’s Divided Difference Method of
Interpolation
http://numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu3
What is Interpolation ?Given (x0,y0), (x1,y1), …… (xn,yn), find the value of ‘y’ at a value of ‘x’ that is not given.
http://numericalmethods.eng.usf.edu4
Interpolants
Polynomials are the most common choice of interpolants because they are easy to:
EvaluateDifferentiate, and Integrate.
http://numericalmethods.eng.usf.edu5
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
−−
=
http://numericalmethods.eng.usf.edu6
ExampleThe 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 010 227.0415 362.7820 517.35
22.5 602.9730 901.67
)s( t )m/s( )(tv
http://numericalmethods.eng.usf.edu7
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 s110+x 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.edu8
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 s110+x s0
10− x s range, x desired,
)()( 010 ttbbtv −+=
),15(914.3078.362 −+= t 2015 ≤≤ t
At 16=t )1516(914.3078.362)16( −+=v
69.393= m/s
http://numericalmethods.eng.usf.edu9
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
)()()()(
xxxx
xfxfxx
xfxf
b−
−−
−−−
=
http://numericalmethods.eng.usf.edu10
ExampleThe 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 010 227.0415 362.7820 517.35
22.5 602.9730 901.67
)s( t )m/s( )(tv
http://numericalmethods.eng.usf.edu11
Quadratic Interpolation (contd)
10 12 14 16 18 20200
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.edu12
Quadratic Interpolation (contd) )( 00 tvb =
04.227=
01
011
)()(tt
tvtvb
−−
= 1015
04.22778.362−−
=
148.27=
02
01
01
12
12
2
)()()()(
tttt
tvtvtt
tvtv
b−
−−
−−−
= 1020
101504.22778.362
152078.36235.517
−−−
−−−
=
10
148.27914.30 −=
37660.0=
http://numericalmethods.eng.usf.edu13
Quadratic Interpolation (contd)))(()()( 102010 ttttbttbbtv −−+−+=
),15)(10(37660.0)10(148.2704.227 −−+−+= ttt 2010 ≤≤ t
At ,16=t
)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.edu14
General Form))(()()( 1020102 xxxxbxxbbxf −−+−+=
where
Rewriting))(](,,[)](,[][)( 1001200102 xxxxxxxfxxxxfxfxf −−+−+=
)(][ 000 xfxfb ==
01
01011
)()(],[
xxxfxf
xxfb−−
==
02
01
01
12
12
02
01120122
)()()()(],[],[
],,[xx
xxxfxf
xxxfxf
xxxxfxxfxxxfb
−−−
−−−
=−−
==
http://numericalmethods.eng.usf.edu15
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.edu16
General formThe third order polynomial, given ),,( 00 yx ),,( 11 yx ),,( 22 yx and ),,( 33 yx is
))()(](,,,[
))(](,,[)](,[][)(
2100123
1001200103
xxxxxxxxxxfxxxxxxxfxxxxfxfxf
−−−+−−+−+=
0b
0x )( 0xf 1b
],[ 01 xxf 2b
1x )( 1xf ],,[ 012 xxxf 3b
],[ 12 xxf ],,,[ 0123 xxxxf
2x )( 2xf ],,[ 123 xxxf
],[ 23 xxf
3x )( 3xf
http://numericalmethods.eng.usf.edu17
ExampleThe 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 010 227.0415 362.7820 517.35
22.5 602.9730 901.67
)s( t )m/s( )(tv
http://numericalmethods.eng.usf.edu18
ExampleThe velocity profile is chosen as
))()(())(()()( 2103102010 ttttttbttttbttbbtv −−−+−−+−+=we need to choose four data points that are closest to 16=t
,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
http://numericalmethods.eng.usf.edu19
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 −× ,202 =t 35.517 44453.0
248.34 ,5.223 =t 97.602
http://numericalmethods.eng.usf.edu20
ExampleHence
))()(())(()()( 2103102010 ttttttbttttbttbbtv −−−+−−+−+=
)20)(15)(10(10*4347.5
)15)(10(37660.0)10(148.2704.2273 −−−+
−−+−+=− ttt
ttt
At ,16=t
)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.edu21
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.edu22
Distance from Velocity ProfileFind 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=
http://numericalmethods.eng.usf.edu23
Acceleration from Velocity ProfileFind the acceleration of the rocket at t=16s given that
32 0054347.013204.0265.212541.4)( ttttv +++−=
( )32 0054347.013204.0265.212541.4)()( tttdtdtv
dtdta +++−==
2016304.026408.0265.21 tt ++=
2)16(016304.0)16(26408.0265.21)16( ++=a
2/ 664.29 sm=
Additional ResourcesFor 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_divided_difference_method.html