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
Mechanical 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
A trunnion is cooled 80°F to − 108°F. Given below is the table of
the coefficient of thermal expansion vs. temperature. Determine
the value of the coefficient of thermal expansion at T=−14°F using
the direct method for linear interpolation.
6
Temperature
(oF)
Thermal Expansion
Coefficient (in/in/oF)
80
6.47 × 10−6
0
6.00 × 10−6
−60
5.58 × 10−6
−160
4.72 × 10−6
−260
3.58 × 10−6
−340
2.45 × 10−6
http://numericalmethods.eng.usf.edu
Linear Interpolation
 (T )  b0  b1 (T  T0 )
T0  0, αT0   6.0010
6
6
T1  60, αT1   5.5810
6
b0   (T0 )
5.9
ys
5.8
f ( range)

 6.0010
 (T 1 )  (T 0 )
b1 
T 1 T 0
6

f x desired
6
5.7
5.6
5.58
6
5.5810  6.0010

 60  0
5.5
10
x s  10
0
15
20
25
30
x s  range x desired
35
40
45
50
x s  10
 0.007106
7
http://numericalmethods.eng.usf.edu
1
Linear Interpolation (contd)
6
αT   b0  b1 T  T0 
5.9
 6.00106  0.007106 T  0,
ys
5.8
f ( range)
 60  T  0


f x desired
α 14  6.0010  0.00710
6
6
 5.90210
6
in/in/F
 14  0
5.7
5.6
5.58
5.5
10
0
8
15
x s  10
20
25
30
35
40
45
x s  range x desired
http://numericalmethods.eng.usf.edu
50
x s  10
1
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
A trunnion is cooled 80°F to − 108°F. Given below is the table of
the coefficient of thermal expansion vs. temperature. Determine
the value of the coefficient of thermal expansion at T=−14°F using
the direct method for quadratic interpolation.
10
Temperature
(oF)
Thermal Expansion
Coefficient (in/in/oF)
80
6.47 × 10−6
0
6.00 × 10−6
−60
5.58 × 10−6
−160
4.72 × 10−6
−260
3.58 × 10−6
−340
2.45 × 10−6
http://numericalmethods.eng.usf.edu
Quadratic Interpolation (contd)
αT   b0  b1 T  T0   b2 T  T0 T  T1 
6.47
T0  80,
αT0   6.4710
T1  0,
αT1   6.00106
T2  60,
6
αT2   5.58106
6.6
6.4
6.2
ys
f ( range)


6
f x desired
5.8
5.6
5.58
5.4
60
 60
11
40
20
0
20
40
60
x s  range x desired
http://numericalmethods.eng.usf.edu
80
80
Quadratic Interpolation (contd)
b0  αT0   6.47106
αT1   αT0  6.00106  6.47106
b1 

 5.875109
T1  T0
0  80
α T2   α T1  α T1   α T0 

T2  T1
T1  T0
b2 
T2  T0
5.58 106  6.00  106 6.00  106  6.47  106

 60  0
0  80

 60  80
0.007 106  0.005875 106

 140
 8.0357 1012
12
http://numericalmethods.eng.usf.edu
Quadratic Interpolation (contd)
αT   b0  b1 T  T0   b2 T  T0 T  T1 
 6.47106  5.875109 T  80  8.03571012 T  80T  0,  60  T  80
At T  14,
α 14  6.4710- 6  5.87510-9  14  80  8.035710-12  14  80 14  0
 5.9072106 in/in/F
The absolute relative approximate error a obtained between the results from the
first and second order polynomial is
5.907210- 6  5.90210- 6
a 
100
-6
5.907210
 0.087605%
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
A trunnion is cooled 80°F to − 108°F. Given below is the table of
the coefficient of thermal expansion vs. temperature. Determine
the value of the coefficient of thermal expansion at T=−14°F using
the direct method for cubic interpolation.
17
Temperature
(oF)
Thermal Expansion
Coefficient (in/in/oF)
80
6.47 × 10−6
0
6.00 × 10−6
−60
5.58 × 10−6
−160
4.72 × 10−6
−260
3.58 × 10−6
−340
2.45 × 10−6
http://numericalmethods.eng.usf.edu
Example
The coefficient of thermal expansion profile is chosen as
αT   b0  b1 T  T0   b2 T  T0 T  T1   b3 T  T0 T  T1 T  T2 
T0  80,
αT0   6.47106
T1  0,
αT1   6.00106
T2  60,
T3  160,
18
αT2   5.58106
αT3   4.72106
http://numericalmethods.eng.usf.edu
Example
b0
T0  80,
6.47 106
b1
5.875109
T1  0,
6.00106
b2
 8.03571012
0.007106
T2  60,
5.58106
b3
8.18451015
 1011
0.0086106
T3  160,
4.72106
The values of the constants are
b0  6.47106 b1  5.875109 b2  8.03571012
19
b3  8.18451015
http://numericalmethods.eng.usf.edu
Example
α T   b0  b1 T  T0   b2 T  T0 T  T1   b3 T  T0 T  T1 T  T2 
 6.47 106  5.875109 T  80  8.03571012 T  80T  0 
 8.18451015 T-80T-0 T  60
At T  14,
α 14  6.47 106  5.875109  14  80  8.03571012  14  80 14  0
 8.18451015  14  80 14  0 14  60
 5.9077106 in/in/F
The absolute relative approximate error a obtained between the results from the second and
third order polynomial is
5.9077106  5.9072106
a 
100
6
5.907710
20
 0.0083867%
http://numericalmethods.eng.usf.edu
Comparison Table
21
Order of Polynomial
1
2
3
Thermal Expansion
Coefficient (in/in/oF)
5.902 × 10−6
5.9072 × 10−6
5.9077 × 10−6
Absolute Relative
Approximate Error
----------
0.087605%
0.0083867%
http://numericalmethods.eng.usf.edu
Reduction in Diameter
The actual reduction in diameter is given by
Tf
D  D  dT
Tr
where Tr = room temperature (°F)
Tf = temperature of cooling medium (°F)
108
Since Tr = 80 °F and Tr = −108 °F, D  D
 dT
80
Find out the percentage difference in the reduction in the
diameter by the above integral formula and the result
using the thermal expansion coefficient from the cubic
interpolation.
22
http://numericalmethods.eng.usf.edu
Reduction in Diameter
We know from interpolation that
 T   6.00106  6.4786109 T  8.19441012 T 2  8.18451015 T 3 ,
 160  T  80
Therefore,
Tf
D
  dT
D Tr
108

 6.0010
6

 6.4786109 T  8.19441012 T 2  8.18451015 T 3 dT
80
180

T
T
T 
 6.00106 T  6.4786109
 8.19441012
 8.18451015 
2
3
4  80

2
3
4
 1105.9 106
23
http://numericalmethods.eng.usf.edu
Reduction in diameter
Using the average value for the coefficient of thermal
expansion from cubic interpolation
D
 T
D
  T f  Tr 
 5.9077106  108 80
 1110.6 106
The percentage difference would be


 1105.9 106   1110.6 106
a 
100
6
 1105.9 10
 0.42775%
24
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