Newton's Divided Difference Polynomial Power Point

Download Report

Transcript Newton's Divided Difference Polynomial Power Point

Newton’s Divided Difference
Polynomial Method of
Interpolation
Electrical Engineering Majors
Authors: Autar Kaw, Jai Paul
http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM
Undergraduates
http://numericalmethods.eng.usf.edu
1
Newton’s Divided
Difference Method of
Interpolation
http://numericalmethods.eng.usf.edu
What is Interpolation ?
Given (x0,y0), (x1,y1), …… (xn,yn), find the
value of ‘y’ at a value of ‘x’ that is not given.
3
http://numericalmethods.eng.usf.edu
Interpolants
Polynomials are the most common
choice of interpolants because they
are easy to:
Evaluate
Differentiate, and
Integrate.
4
http://numericalmethods.eng.usf.edu
Newton’s Divided Difference
Method
Linear interpolation: Given ( x0 , y0 ), ( x1 , y1 ), pass a
linear interpolant through the data
f1 ( x)  b0  b1 ( x  x0 )
where
b0  f ( x0 )
b1 
5
f ( x1 )  f ( x0 )
x1  x0
http://numericalmethods.eng.usf.edu
Example
Thermistors are based on materials’ change in resistance with
temperature. A manufacturer of thermistors makes the following
observations on a thermistor. Determine the temperature
corresponding to 754.8 ohms using the Newton Divided Difference
method for linear interpolation.
6
R (Ω)
T(°C)
1101.0
911.3
636.0
451.1
25.113
30.131
40.120
50.128
http://numericalmethods.eng.usf.edu
Linear Interpolation
40.12
T ( R)  b0  b1 ( R  R0 )
42
40
38
R0  911.3, T ( R0 )  30.131
ys
R1  636.0, T ( R1 )  40.120
f x desired
f ( range)


36
34
b0  T ( R0 )
32
30.131
 30 .131
T (R 1 ) T (R 0 ) 40.120  30.131

b1 
636 .0  911 .3
R1  R 0
30
946
x s  10
0
896
846
796
746
696
x s  range x desired
 0.036284
7
http://numericalmethods.eng.usf.edu
646
x s  10
1
Linear Interpolation (contd)
40.12
42
40
38
ys
f ( range)


36
f x desired
34
32
30.131
30
946
896
x s  10
0
846
796
746
696
x s  range x desired
646
x s  10
1
T ( R)  b0  b1 ( R  R0 )
 30.131 0.036284( R  911.3),
636 .0  R  911 .3
At R  754 .8
T (754.8)  30.131 0.036284(754.8  911.3)
8
 35.809 C
http://numericalmethods.eng.usf.edu
Quadratic Interpolation
Given ( x0 , y0 ), ( x1 , y1 ), and ( x2 , y 2 ), fit a quadratic interpolant through the data.
f 2 ( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )(x  x1 )
b0  f ( x0 )
f ( x1 )  f ( x0 )
b1 
x1  x0
f ( x2 )  f ( x1 ) f ( x1 )  f ( x0 )

x2  x1
x1  x0
b2 
x 2  x0
9
http://numericalmethods.eng.usf.edu
Example
Thermistors are based on materials’ change in resistance with
temperature. A manufacturer of thermistors makes the following
observations on a thermistor. Determine the temperature
corresponding to 754.8 ohms using the Newton Divided Difference
method for quadratic interpolation.
10
R (Ω)
T(°C)
1101.0
911.3
636.0
451.1
25.113
30.131
40.120
50.128
http://numericalmethods.eng.usf.edu
Quadratic Interpolation (contd)
50.128
55
50
ys
45
f ( range)


f x desired
40
35
30.131
30
400
451.1
500
600
700
x s  range x desired
800
900
1000
911.3
T ( R)  b0  b1 ( R  R0 )  b2 ( R  R0 )(R  R1 )
R0  911.3, T ( R0 )  30.131
11
R1  636.0, T ( R1 )  40.120
R2  451.1, T ( R2 )  50.128
http://numericalmethods.eng.usf.edu
Quadratic Interpolation (contd)
b0  T ( R0 )
 30 .131
T ( R1 )  T ( R0 )
40.120  30.131

b1 
636 .0  911 .3
R1  R0
 0.036284
T ( R2 )  T ( R1 ) T ( R1 )  T ( R0 ) 50.128 40.120 40.120 30.131


R2  R1
R1  R0
636.0  911.3
b2 
 451.1  636.0
R2  R0
451.1  911.3
 0.054127  0.036284

 460 .2
 3.8771105
12
http://numericalmethods.eng.usf.edu
Quadratic Interpolation (contd)
T ( R)  b0  b1 ( R  R0 )  b2 ( R  R0 )(R  R1 )
 30.131 0.036284( R  911.3)  3.8771105 ( R  911.3)(R  636.0), 451 .1  R  911 .3
At R  754.8,
T (754.8)  30.131 0.036284(754.8  911.3)  3.8771105 (754.8  911.3)(754.8  636.0)
 35.089 C
The absolute relative approximate error a obtained between the results from the first and
second order polynomial is
a 
35.089  35.809
 100
35.089
 2.0543 %
13
http://numericalmethods.eng.usf.edu
General Form
f 2 ( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )(x  x1 )
where
b0  f [ x0 ]  f ( x0 )
f ( x1 )  f ( x 0 )
b1  f [ x1 , x0 ] 
x1  x0
f ( x 2 )  f ( x1 ) f ( x1 )  f ( x0 )

f [ x 2 , x1 ]  f [ x1 , x0 ]
x 2  x1
x1  x0
b2  f [ x 2 , x1 , x0 ] 

x 2  x0
x 2  x0
Rewriting
f 2 ( x)  f [ x0 ]  f [ x1 , x0 ](x  x0 )  f [ x2 , x1 , x0 ](x  x0 )(x  x1 )
14
http://numericalmethods.eng.usf.edu
General Form
Given (n  1) data points, x0 , y0 , x1 , y1 ,......,xn1 , yn1 , xn , yn  as
f n ( x)  b0  b1 ( x  x0 )  .... bn ( x  x0 )(x  x1 )...(x  xn1 )
where
b0  f [ x0 ]
b1  f [ x1 , x0 ]
b2  f [ x2 , x1 , x0 ]

bn1  f [ xn1 , xn2 ,....,x0 ]
bn  f [ xn , xn1 ,....,x0 ]
15
http://numericalmethods.eng.usf.edu
General form
The third order polynomial, given ( x0 , y0 ), ( x1 , y1 ), ( x2 , y 2 ), and ( x3 , y3 ), is
f 3 ( x)  f [ x0 ]  f [ x1 , x0 ](x  x0 )  f [ x2 , x1 , x0 ](x  x0 )(x  x1 )
 f [ x3 , x2 , x1 , x0 ](x  x0 )(x  x1 )(x  x2 )
b0
x0
b1
f ( x0 )
b2
f [ x1 , x0 ]
x1
f ( x1 )
f [ x2 , x1 , x0 ]
f [ x2 , x1 ]
x2
f ( x2 )
b3
f [ x3 , x2 , x1 , x0 ]
f [ x3 , x2 , x1 ]
f [ x3 , x 2 ]
x3
16
f ( x3 )
http://numericalmethods.eng.usf.edu
Example
Thermistors are based on materials’ change in resistance with
temperature. A manufacturer of thermistors makes the following
observations on a thermistor. Determine the temperature
corresponding to 754.8 ohms using the Newton Divided Difference
method for cubic interpolation.
17
R (Ω)
T(°C)
1101.0
911.3
636.0
451.1
25.113
30.131
40.120
50.128
http://numericalmethods.eng.usf.edu
Example
For the third order polynomial, we choose the temperature given by
T ( R)  b0  b1 ( R  R0 )  b2 ( R  R0 )(R  R1 )  b3 ( R  R0 )(R  R1 )(R  R2 )
R0  1101.0,
R1  911.3,
T ( R0 )  25.113
T ( R1 )  30.131
R2  636.0, T ( R2 )  40.120
R3  451.1, T ( R3 )  50.128
18
http://numericalmethods.eng.usf.edu
Example
b0
R0  1101.0,
25 .113
b1
 0.026452
R1  911.3,
b2
2.1144105
30 .131
 2.7124108
 0.036284
R2  636.0,
b3
3.8771105
40 .120
 0.054127
R3  451.1,
50 .128
The values of the constants are found as:
b0  25.113
19
b1  0.026452 b2  2.1144105
b3  2.7124108
http://numericalmethods.eng.usf.edu
Example
T R   b0  b1 R  R0   b2 R  R0 R  R1   b3 R  R0 R  R1 R  R2 
 25.113 0.026452R  1101.0   2.1144105 R  1101.0 R  911.3
 2.7124108 R  1101.0R  911.3R  636.0 , 451.1  R  1101.0
At R  754.8,
T (754.8)  25.113 0.026452(754.8  1101.0)  2.1144105 (754.8  1101.0)(754.8  911.3)
 2.7124108 754.8  1101.0754.8  911.3754.8  626.0
 35.242C
The absolute percentage relative approximate error, a for the value obtained for T(754.8)
between second and third order polynomial is
a 
35.242  35.089
 100
35.242
 0.43458 %
20
http://numericalmethods.eng.usf.edu
Comparison Table
21
Order of
Polynomial
1
2
3
Temperature C
35.809
35.089
35.242
Absolute Relative
Approximate Error
----------
2.0543%
0.43458%
http://numericalmethods.eng.usf.edu
Actual Calibration
The actual calibration curve used by industry is given by
1
 b0  b1 (ln R  ln R0 )  b2 (ln R  ln R0 )(ln R  ln R1 )  b3 (ln R  ln R0 )(ln R  ln R1 )(ln R  ln R2 )
T
1
substituting y  , and x  ln R, the calibration curve is given by
T
y( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )(x  x1 )  b3 ( x  x0 )(x  x1 )(x  x2 )
R (Ω)
1101.0
911.3
636.0
451.1
22
T (°C)
25.113
30.131
40.120
50.128
x(ln R)
7.0040
6.8149
6.4552
6.1117
y(1/T)
0.039820
0.033188
0.024925
0.019949
Find the calibration curve and find the temperature corresponding to 754.8
ohms. What is the difference between the results from cubic interpolation?
In which method is the difference larger, if the actual measured value at
754.8 ohms is 35.285 C ?
http://numericalmethods.eng.usf.edu
Actual Calibration
y( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )(x  x1 )  b3 ( x  x0 )(x  x1 )(x  x2 )
xo  7.0040, yxo   0.039820
x1  6.8149, yx1   0.033188
x2  6.4552, yx2   0.024925
x3  6.1117, yx3   0.019949
23
http://numericalmethods.eng.usf.edu
Actual Calibration
b0
xo  7.0040, 0.039820
b1
0.035069
x1  6.8149, 0.033188
b2
0.022040
0.022974
x2  6.4552, 0.024925
b3
0.011173
0.012070
0.014487
x3  6.1117, 0.019949
The values of the constants are found as:
b1  0.035069
b0  0.039820
b2  0.022040
24
b3  0.011173
http://numericalmethods.eng.usf.edu
Actual Calibration
y( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )(x  x1 )  b3 ( x  x0 )(x  x1 )(x  x2 )
 0.039820 0.035069x  7.0040  0.022974x  7.0040x  6.8149
 0.011173x  7.0040x  6.8149x  6.4552, 6.1117 x  7.0040
Since x  ln 754 .8  6.6265
At x  6.6265,
y6.6265  0.039820 0.0350716.6265 7.0040  0.0229726.6265 7.00406.6265 6.8149
 0.0111826.6265 7.00406.6265 6.81496.6265 6.4552
 0.028285
T
1
y

1
0.028285
 35.355 C
25
http://numericalmethods.eng.usf.edu
Actual Calibration
Since the actual measured value at 754.8 ohms is 35.285 C , the absolute relative true error
between the value used for Cubic Interpolation is
t 
35.285  35.242
 100
35.285
 0.12253 %
and for actual calibration is
t 
35.285 35.355
100
35.285
 0.19825 %
Therefore, the calibration curve obtained more accurate results than a cubic polynomial
interpolant given by Newton’s Divided Difference method
26
http://numericalmethods.eng.usf.edu
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