Uploaded by biplov.max

Interploation (Example problem with solution for class Test 1)

advertisement
Newton’s Divided Difference Interpolation –
Example 1
For the purpose of shrinking a trunnion into a hub, the reduction of diameter D of a
trunnion shaft by cooling it through a temperature change of T is given by
D  DT
where
D  original diameter in.
  coefficient of thermal expansion at average temperature in/in/F
The trunnion is cooled from 80F to  108F , giving the average temperature as  14F .
The table of the coefficient of thermal expansion vs. temperature data is given in Table 1.
Table 1 Thermal expansion coefficient as a function of temperature.
Temperature, T F Thermal Expansion Coefficient,  in/in/ F
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
Figure 1 Thermal expansion coefficient vs. temperature.
Determine the value of the coefficient of thermal expansion at T  14F using Newton’s
divided difference method of interpolation and a first order polynomial.
Solution
For linear interpolation, the coefficient of thermal expansion is given by
 (T )  b0  b1 (T  T0 )
Since we want to find the coefficient of thermal expansion at T  14 and we are using a
first order polynomial, we need to choose the two data points that are closest to T  14 that
also bracket T  14 to evaluate it. The two points are T0  0 and T1  60 .
Then
T0  0,  (T0 )  6.00  10 6
T1  60,  (T1 )  5.58  10 6
gives
b0   (T0 )
 6.00  10 6
 (T 1 )  (T 0 )
b1 
T 1 T 0
5.58  10 6  6.00  10 6

 60  0
 0.007  10 6
Hence
 (T )  b0  b1 (T  T0 )
 6.00  10 6  0.007  10 6 (T  0),
 60  T  0
At T  14
 (14)  6.00  10 6  0.007  10 6 (14  0)
 5.902  10 6 in/in/ F
If we expand
 60  T  0
 (T )  6.00  10 6  0.007  10 6 (T  0),
we get
 60  T  0
 (T )  6.00  10 6  0.007  10 6 T ,
This is the same expression that was obtained with the direct method.
Example 2
For the purpose of shrinking a trunnion into a hub, the reduction of diameter D of a
trunnion shaft by cooling it through a temperature change of T is given by
D  DT
where
D  original diameter in.
  coefficient of thermal expansion at average temperature in/in/F
The trunnion is cooled from 80F to  108F , giving the average temperature as  14F .
The table of the coefficient of thermal expansion vs. temperature data is given in Table 2.
Table 2 Thermal expansion coefficient as a function of temperature.
Temperature, T F Thermal Expansion Coefficient,  in/in/ F
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
Determine the value of the coefficient of thermal expansion at T  14F using Newton’s
divided difference method of interpolation and a second order polynomial. Find the absolute
relative approximate error for the second order polynomial approximation.
Solution
For quadratic interpolation, the coefficient of thermal expansion is given by
 (T )  b0  b1 (T  T0 )  b2 (T  T0 )(T  T1 )
Since we want to find the coefficient of thermal expansion at T  14, we need to choose the
three data points that are closest to T  14 that also bracket T  14 to evaluate it. The
three points are T0  80, T1  0 and T2  60 .
Then
T0  80,  (T0 )  6.47  10 6
 (T1 )  6.00  10 6
T2  60,  (T2 )  5.58  10 6
T1  0,
gives
b0   (T0 )
 6.47  10 6
 (T1 )   (T0 )
b1 
T1  T0
6.00  10 6  6.47  10 6

0  80
 5.875  10 9
 (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
6
0.007  10  0.005875  10 6

 140
 8.0357  10 12
Hence
 (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
5.9072  10 6
 0.087605%
If we expand
 (T )  6.47  10 6  5.875  10 9 (T  80)  8.0357  10 12 (T  80)(T  0),  60  T  80
we get
 T   6.00  10 6  6.5179  10 9 T  8.0357  10 12 T 2 ,
 60  T  80
This is the same expression that was obtained with the direct method.
Example 3
For the purpose of shrinking a trunnion into a hub, the reduction of diameter D of a
trunnion shaft by cooling it through a temperature change of T is given by
D  DT
where
D  original diameter in.
  coefficient of thermal expansion at average temperature in/in/F
The trunnion is cooled from 80F to  108F , giving the average temperature as  14F .
The table of the coefficient of thermal expansion vs. temperature data is given in Table 3.
Table 3 Thermal expansion coefficient as a function of temperature.
Temperature, T F Thermal Expansion Coefficient,  in/in/ F
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
a) Determine the value of the coefficient of thermal expansion at T  14F using
Newton’s divided difference method of interpolation and a third order polynomial.
Find the absolute relative approximate error for the third order polynomial
approximation.
b) The actual reduction in diameter is given by
Tf
D  D  dT
Tr
where
Tr  room temperature F
T f  temperature of cooling medium F
Since
Tr  80F
T f  108 F
108
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 part (a).
Solution
a) For cubic interpolation, the coefficient of thermal expansion is given by
 (T )  b0  b1 (T  T0 )  b2 (T  T0 )(T  T1 )  b3 (T  T0 )(T  T1 )(T  T2 )
Since we want to find the coefficient of thermal expansion at T  14 and we are using a
third order polynomial, we need to choose the four data points that are closest to T  14
and bracket T  14 . These four data points are T0  80, T1  0, T2  60 and T3  160.
Then
T0  80,  (T0 )  6.47  10 6
 (T1 )  6.00  10 6
T2  60,  (T2 )  5.58  10 6
T3  160,  (T3 )  4.72  10 6
T1  0,
gives
b0   [T0 ]
  (T0 )
 6.47  10 6
b1   [T1 , T0 ]
 (T1 )   (T0 )

T1  T0
6.00  10 6  6.47  10 6

0  80
 5.875  10 9
b2   [T2 , T1 , T0 ]
 [T2 , T1 ]   [T1 , T0 ]

T2  T0
 (T2 )   (T1 )
 [T2 , T1 ] 
T2  T1
5.58  10 6  6.00  10 6
 60  0
 0.007  10 6
 [T1 , T0 ]  5.875  10 9

b2 
 [T2 , T1 ]   [T1 , T0 ]
T2  T0
0.007  10 6  0.005875  10 6
 60  80
 8.0357  10 12

Newton’s Divided Difference Method-More Examples: Mechanical Engineering
05.03.7
b3   [T3 , T2 , T1 , T0 ]
 [T3 , T2 , T1 ]   [T2 , T1 , T0 ]

T3  T0
 [T3 , T2 ]   [T2 , T1 ]
 [T3 , T2 , T1 ] 
T3  T1
 (T3 )   (T2 )
 [T3 , T2 ] 
T3  T2
4.72  10 6  5.58  10 6

 160  60
 0.0086  10 6
 [T2 , T1 ]  0.007  10 6
 [T3 , T2 ]   [T2 , T1 ]
 [T3 , T2 , T1 ] 
T3  T1
0.0086  10 6  0.007  10 6
 160  0
11
 10
 [T2 , T1 , T0 ]  8.0357  10 12
b3   [T3 , T2 , T1 , T0 ]
 [T3 , T2 , T1 ]   [T2 , T1 , T0 ]

T3  T0

 10 11  8.0357  10 12
 160  80
 8.1845  10 15

Hence
 (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
5.9077  10 6
 0.0083867%
b) In finding the percentage difference in the reduction in diameter, we can rearrange the
integral formula to
Tf
D
 dT
D Tr
and since we know from part (a) that
 (T )  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),  160  T  80
Combining like terms, we get
 (T )  6.00  10 6  6.4786  10 9 T  8.1994  10 12 T 2  8.1845  10 15 T 3 ,  160  T  80
We see that we can use the integral formula in the range from T f  108 F to Tr  80F
Therefore,
Tf
D
 dT
D Tr
108

 (6.00  10
6
 6.4786  10 3 T  8.1994  10 6 T 2  8.1845  10 9 T 3 )dT
80
108

T2
T3
T4
 6.00  10 6 T  6.4786  10 9
 8.1994  10 9
 8.1845  10 15

2
3
4  80

 1105.9  10 6
D
 1105.9  10 6 in/in using the actual reduction in diameter integral formula. If we
D
use the average value for the coefficient of thermal expansion from part (a), we get
D
 T
D
  (T f  Tr )
So
 5.9077  10 6 (108  80)
 1110.6  10 6
D
 1110.6  10 6 in/in using the average value of the coefficient of thermal
D
expansion using a third order polynomial. Considering the integral to be the more accurate
calculation, the percentage difference would be
 1105.9  10 6  1110.6  10 6
a 
 100
 1105.9  10 6
 0.42775%
and
Example 4
The geometry of a cam is given in Figure 1. A curve needs to be fit through the seven points
given in Table 1 to fabricate the cam.
4
3
5
2
6
y
7
1
x
Figure 1 Schematic of cam profile.
Table 1 Geometry of the cam.
Point x in. y in.
1
2.20
0.00
2
1.28
0.88
3
0.66
1.14
4
0.00
1.20
5
–0.60
1.04
6
–1.04
0.60
7
–1.20
0.00
If the cam follows a straight line profile from x  1.28 to x  0.66 , what is the value of y at
x  1.10 using Newton’s divided difference method of interpolation and a first order
polynomial.
Solution
For linear interpolation, the value of y is given by
y ( x)  b0  b1 ( x  x0 )
Since we want to find the value of y at x  1.10 , using the two points x  1.28 and
x  0.66 , then
x0  1.28, y ( x0 )  0.88
x1  0.66, y ( x1 )  1.14
gives
b0  y ( x0 )
 0.88
y (x 1 )  y (x 0 )
b1 
x1 x 0
1.14  0.88

0.66  1.28
 0.41935
Hence
y ( x)  b0  b1 ( x  x 0 )
 0.88  0.41935( x  1.28),
0.66  x  1.28
At x  1.10
y (4.00)  0.88  0.41935(1.10  1.28)
 0.95548 in.
If we expand
y ( x)  0.88  0.41935( x  1.28),
0.66  x  1.28
we get
0.66  x  1.28
y ( x)  1.4168  0.41935 x,
This is the same expression that was obtained with the direct method.
Example 5
The geometry of a cam is given in Figure 2. A curve needs to be fit through the seven points
given in Table 2 to fabricate the cam.
4
3
5
2
6
y
7
1
x
Figure 2 Schematic of cam profile.
Table 2 Geometry of the cam.
Point x in. y in.
1
2.20
0.00
2
1.28
0.88
3
0.66
1.14
4
0.00
1.20
5
–0.60
1.04
6
–1.04
0.60
7
–1.20
0.00
If the cam follows a quadratic profile from x  2.20 to x  1.28 to x  0.66 , what is the
value of y at x  1.10 using Newton’s divided difference method of interpolation and a
second order polynomial. Find the absolute relative approximate error for the second order
polynomial approximation.
Solution
For quadratic interpolation, the value of y is chosen as
y ( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )( x  x1 )
Since we want to find the value of y at x  1.10, using the three points x0  2.20 , x1  1.28
and x 2  0.66 , then
x0  2.20, y ( x 0 )  0.00
x1  1.28, y ( x1 )  0.88
x 2  0.66, y ( x 2 )  1.14
gives
b0  y ( x0 )
 0.00
y ( x1 )  y ( x0 )
x1  x 0
0.88  0.00

1.28  2.20
 0.95652
y ( x 2 )  y ( x1 ) y ( x1 )  y ( x 0 )

x 2  x1
x1  x0
b2 
x 2  x0
1.14  0.88 0.88  0.00

0
.
66

1
.
28
1.28  2.20

0.66  2.20
 0.41935  0.95652

 1.54
 0.34881
b1 
Hence
y ( x)  b0  b1 ( x  x 0 )  b2 ( x  x0 )( x  x1 )
 0  0.95652( x  2.20)  0.34881( x  2.20)( x  1.28), 0.66  x  2.20
At x  1.10,
y (1.10)  0  0.95652(1.10  2.20)  0.34881(1.10  2.20)(1.10  1.28)
 0.98311 in.
The absolute relative approximate error a obtained between the results from the first and
second order polynomial is
0.98311  0.95548
a 
 100
0.98311
 2.8100%
If we expand
y ( x)  0  0.95652( x  2.20)  0.34881( x  2.20)( x  1.28), 0.66  x  2.20
we get
y ( x)  1.1221  0.25734 x  0.34881x 2 ,
0.66  x  2.20
This is the same expression that was obtained with the direct method.
Lagrange Method of Interpolation
Example 1
For the purpose of shrinking a trunnion into a hub, the reduction of diameter D of a
trunnion shaft by cooling it through a temperature change of T is given by
D  DT
where
D  original diameter in.
  coefficient of thermal expansion at average temperature in/in/F
The trunnion is cooled from 80F to  108F , giving the average temperature as  14F .
The table of the coefficient of thermal expansion vs. temperature data is given in Table 1.
Table 1 Thermal expansion coefficient as a function of temperature.
Temperature, T F Thermal Expansion Coefficient,  in/in/ F
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
Figure 1 Thermal expansion coefficient vs. temperature.
If the coefficient of thermal expansion needs to be calculated at the average temperature of
 14F , determine the value of the coefficient of thermal expansion at T  14F using a
first order Lagrange polynomial.
Solution
For first order Lagrange polynomial interpolation (also called linear interpolation), the
coefficient of thermal expansion is given by
1
 (T )   Li (T ) (Ti )
i 0
 L0 (T ) (T0 )  L1 (T ) (T1 )
y
(x1, y1)
f1(x)
(x0, y0)
x
Figure 2 Linear interpolation.
Since we want to find the coefficient of thermal expansion at T  14 F , we choose two
data points that are closest to T  14 F and that also bracket T  14 F . The two points
are T0  0 and T1  60 F .
Then
T0  0,  T0   6.00  10 6
T1  60,  T1   5.58  10 6
gives
1
L0 (T )  
j 0
j 0

T0  T j
T  T1
T0  T1
1 T T
j
L1 (T )  
j 0
j 1

T  Tj
T1  T j
T  T0
T1  T0
Hence
T  T0
T  T1
 (T0 ) 
 (T1 )
T0  T1
T1  T0
T  60
T 0

(6.00  10 6 ) 
(5.58  10 6 ),  60  T  0
0  60
 60  0
 (T ) 
 14  60
 14  0
(6.00  10 6 ) 
(5.58  10 6 )
0  60
 60  0
6
 0.76667(6.00  10 )  0.23333(5.58  10 6 )
 5.902  10 6 in/in/ F
You can see that L0 (T )  0.76667 and L1 (T )  0.23333 are like weightages given to the
coefficients of thermal expansion at T  0 and T  60F to calculate the coefficient of
thermal expansion at T  14F .
 (14) 
Example 2
For the purpose of shrinking a trunnion into a hub, the reduction of diameter D of a
trunnion shaft by cooling it through a temperature change of T is given by
D  DT
where
D  original diameter in.
  coefficient of thermal expansion at average temperature in/in/F
The trunnion is cooled from 80F to  108F , giving the average temperature as  14F .
The table of the coefficient of thermal expansion vs. temperature data is given in Table 2.
Table 2 Thermal expansion coefficient as a function of temperature.
Thermal Expansion Coefficient,  in/in/F
Temperature, T F
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
If the coefficient of thermal expansion needs to be calculated at the average temperature of
 14 F , determine the value of the coefficient of thermal expansion at T  14 F using a
second order Lagrangian polynomial. Find the absolute relative approximate error for the
second order polynomial interpolation.
Solution
For second order Lagrange polynomial interpolation (also called quadratic interpolation), the
coefficient of thermal expansion given by
2
 (T )   Li (T ) (Ti )
i 0
 L0 (T ) (T0 )  L1 (T ) (T1 )  L2 (T ) (T2 )
y
(x1, y1)
f1(x)
(x0, y0)
x
Figure 3 Quadratic interpolation.
Since we want to find the coefficient of thermal expansion at T  14F , we need to choose
data points that are closest to T  14F that also bracket T  14F to evaluate it. The
three points are T0  80 F , T1  0 and T2  60 F .
T0  80,  T0   6.47  10 6
T1  0,  T1   6.00  10 6
T2  60,  T2   5.58  10 6
gives
2
L0 (T )  
j 0
j 0
T  Tj
T0  T j
 T  T1  T  T2

 
 T0  T1  T0  T2
2 T T
j
L1 (T )  
j  0 T1  T j



 T  T0  T  T2

 

T
T
0  T1  T2
 1
2 T T
j
L2 (T )  
j  0 T2  T j



j 1
j2
 T  T0
 
 T2  T0
 T  T1 


 T2  T1 
Hence
 T  T1  T  T2

 T0  T1  T0  T2
 (T )  

 T  T0
 (T0 )  

 T1  T0
 T  T2

 T1  T2
 T  T0

 (T1 )  

 T2  T0
 T  T1 

 (T2 ),
 T2  T1 
T0  T  T2
(14  0)(14  60)
(14  80)(14  60)
(6.47  10 6 ) 
(6.00  10 6 )
(80  0)(80  60)
(0  80)(0  60)
(14  80)(14  0)

(5.58  10 6 )
(60  80)(60  0)
 (0.0575)(6.47  10 6 )  (0.90083)(6.00  10 6 )  (0.15667)(5.58  10 6 )
 (14) 
 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
5.9072  10 6
 0.087605%
Example 3
For the purpose of shrinking a trunnion into a hub, the reduction of diameter D of a
trunnion shaft by cooling it through a temperature change of T is given by
D  DT
where
D  original diameter in.
  coefficient of thermal expansion at average temperature in/in/ F
The trunnion is cooled from 80 F to  108 F , giving the average temperature as  14 F .
The table of the coefficient of thermal expansion vs. temperature data is given in Table 3.
Table 3 Thermal expansion coefficient as a function of temperature.
Thermal Expansion Coefficient,  in/in/ F
Temperature, T F
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
a) If the coefficient of thermal expansion needs to be calculated at the average
temperature of  14F , determine the value of the coefficient of thermal expansion at
T  14F a third order Lagrange polynomial. Find the absolute relative approximate
error for the third order polynomial approximation.
b) The actual reduction in diameter is given by
Tf
D  D  dT
Tr
where
Tr  room temperature F
T f  temperature of cooling medium F
Since
Tr  80 F
T f  108 F
108
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 part (a).
Solution
a) For third order Lagrange polynomial interpolation (also called cubic interpolation), the
coefficient of thermal expansion is given by
3
 (T )   Li (T ) (Ti )
i 0
 L0 (T ) (T0 )  L1 (T ) (T1 )  L2 (T ) (T2 )  L3 (T ) (T3 )
y
(x3, y3)
f3(x)
(x1, y1)
(x0, y0)
(x2, y2)
x
Figure 4 Cubic interpolation.
Since we want to find the coefficient of thermal expansion at T  14 F , and we are using a
third order polynomial, we need to choose the four points closest to T  14 F that also
bracket T  14F to evaluate it. The four points are T0  80 F , T1  0 , T2  60 F and
T3  160 F .
Then
T0  80,  T0   6.47  10 6
T1  0,  T1   6.00  10 6
T2  60,  T2   5.58  10 6
T3  160,  T3   4.72  10 6
gives
3
L0 (T )  
j 0
j 0
T  Tj
T0  T j
 T  T1  T  T2

 

T
T
 0 1  T0  T2
3 T T
j
L1 (T )  
j  0 T1  T j
 T  T3 



T
T
3 
 0
 T  T0  T  T2

 
 T1  T0  T1  T2
3 T T
j
L2 (T )  
j  0 T2  T j
 T  T3 


 T1  T3 
j 1
j2
 T  T0  T  T1  T  T3 



 



T
T
T
T
T
T
0  2
1  2
3 
 2
3 T T
j
L3 (T )  
j  0 T3  T j
j 3
 T  T0
 
 T3  T0
 T  T1  T  T2


 T3  T1  T3  T2



Hence
 T  T1  T  T2

 T0  T1  T0  T2
 (T )  
 T  T0
 
 T2  T0
 T  T3 
 T  T0

 (T0 )  
 T0  T3 
 T1  T0
 T  T2

 T1  T2
 T  T0
 T  T1  T  T3 
 (T2 )  


 T3  T0
 T2  T1  T2  T3 
 T  T3 
 (T1 )

 T1  T3 
 T  T1  T  T2


 T3  T1  T3  T2
T0

 (T3 )

 T  T3
 (14) 
(14  0)(14  60)(14  160)
(6.47  10 6 )
(80  0)(80  60)(80  160)
(14  80)(14  60)(14  160)

(6.00  10 6 )
(0  80)(0  60)(0  160)
(14  80)(14  0)(14  160)

(5.58  10 6 )
(60  80)(60  0)(60  160)
(14  80)(14  0)(14  60)

(4.72  10 6 )
(160  80)(160  0)(160  60)
 (0.034979)(6.47  10 6 )  (0.82201)(6.00  10 6 )  (0.22873 )(5.58  10 6 )
 (0.015765 )(4.72  10 6 )
 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
5.9077  10 6
 0.0083867%
b) In finding the percentage difference in the reduction in diameter, we can rearrange the
integral formula to
Tf
D
 dT
D Tr
and since we know from part (a) that
(T  0)(T  60)(T  160)
(6.47  10 6 )
 (T ) 
(80  0)(80  60)(80  160)
(T  80)(T  60)(T  160)

(6.00  10 6 )
(0  80)(0  60)(0  160)
(T  80)(T  0)(T  160)

(5.58  10 6 )
(60  80)(60  0)(60  160)
(T  80)(T  0)(T  60)

(4.72  10 6 ),
 160  T  80
(160  80)(160  0)(160  60)
Combining like terms, we get
 (T )  6.00  10 6  6.4786  10 9 T  8.1994  10 12 T 2  8.1845  10 15 T 3 ,
 160  T  80
We see that we can use the integral formula in the range from T f  108 F to Tr  80 F
Therefore,
Tf
D
 dT
D Tr
108

 (6.00  10
6
 6.4786  10 9 T  8.1994  10 12 T 2  8.1845  10 15 T 3 )dT
80
108

T2
T3
T4
 6.00  10 6 T  6.4786  10 9
 8.1994  10 12
 8.1845  10 15

2
3
4  80

 1105.9  10 6
D
 1105.9  10 6 in/in using the actual reduction in diameter integral formula. If we
D
use the average value for the coefficient of thermal expansion from part (a), we get
D
 T
D
  (T f  Tr )
So
 5.9077  10 6 (108  80)
 1110.6  10 6
D
 1110.6  10 6 in/in using the average value of the coefficient of thermal
D
expansion using a third order polynomial. Considering the integral to be the more accurate
calculation, the percentage difference would be
 1105.9  10 6  1110.6  10 6
a 
 100
 1105.9  10 6
 0.42775%
and
Example 4
The geometry of a cam is given in Figure 1. A curve needs to be fit through the seven points
given in Table 1 to fabricate the cam.
4
3
5
2
6
y
7
1
x
Figure 1 Schematic of cam profile.
Table 1 Geometry of the cam.
Point x in. y in.
1
2.20
0.00
2
1.28
0.88
3
0.66
1.14
4
0.00
1.20
5
–0.60
1.04
6
–1.04
0.60
7
–1.20
0.00
If the cam follows a straight line profile from x  1.28 to x  0.66 , what is the value of y at
x  1.10 using a first order Lagrange polynomial?
Solution
For first order Lagrange polynomial interpolation (also called linear interpolation), the value
of y is given by
1
y ( x)   Li ( x) y ( xi )
i 0
 L0 ( x) y ( x0 )  L1 ( x) y ( x1 )
y
(x1, y1)
f1(x)
(x0, y0)
x
Figure 2 Linear interpolation.
Since we want to find the value of y at x  1.10 , using the two points x0  1.28 and
x1  0.66 , then
x0  1.28, y x 0   0.88
x1  0.66, y  x1   1.14
gives
1
x  xj
L0 ( x)  
j 0 x0  x j
j 0

x  x1
x0  x1
1
x  xj
L1 ( x)  
j 0
j 1

Hence
x1  x j
x  x0
x1  x0
x  x0
x  x1
y ( x1 )
y ( x0 ) 
x1  x0
x 0  x1
x  0.66
x  1.28

(0.88) 
(1.14), 0.66  x  1.28
1.28  0.66
0.66  1.28
1.10  0.66
1.10  1.28
y (1.10) 
(0.88) 
(1.14)
1.28  0.66
0.66  1.28
 0.70968(0.88)  0.29032(1.14)
 0.95548 in.
You can see that L0 ( x)  0.70968 and L1 ( x)  0.29032 are like weightages given to the
values of y at x  1.28 and x  0.66 to calculate the value of y at x  1.10 .
y ( x) 
Example 5
The geometry of a cam is given in Figure 3. A curve needs to be fit through the seven points
given in Table 2 to fabricate the cam.
4
3
5
2
6
y
7
1
x
Figure 3 Schematic of cam profile.
Table 2 Geometry of the cam.
Point x in. y in.
1
2.20
0.00
2
1.28
0.88
3
0.66
1.14
4
0.00
1.20
5
–0.60
1.04
6
–1.04
0.60
7
–1.20
0.00
If the cam follows a quadratic profile from x  2.20 to x  1.28 to x  0.66 , what is the
value of y at x  1.10 using a second order Lagrange polynomial? Find the absolute relative
approximate error for the second order polynomial approximation.
Solution
For second order Lagrange polynomial interpolation (also called quadratic interpolation), the
value of y given by
2
y ( x)   Li ( x) y ( xi )
i 0
 L0 ( x) y ( x 0 )  L1 ( x) y ( x1 )  L2 ( x) y ( x 2 )
y
(x1, y1)
(x2, y2)
f2(x)
(x0, y0)
x
Figure 4 Quadratic interpolation.
Since we want to find the value of y at x  1.10 , using the three points x0  2.20 ,
x1  1.28 , x 2  0.66 , then
x0  2.20, y  x0   0.00
x1  1.28, y  x1   0.88
x 2  0.66, y  x 2   1.14
gives
2
x  xj
L0 ( x)  
j 0 x 0  x j
j 0
 x  x1  x  x 2

 
 x 0  x1  x0  x 2
2
x  xj
L1 ( x)  
j  0 x1  x j



j 1
 x  x0
 
 x1  x0
 x  x 2

 x1  x 2



2
L2 ( x )  
j 0
j2
x  xj
x2  x j
 x  x0
 
 x 2  x0
 x  x1 


 x 2  x1 
Hence
 x  x1  x  x 2

y ( x)  
 x0  x1  x0  x 2

 x  x0
 y ( x0 )  

 x1  x 0
 x  x 2

 x1  x 2
 x  x0

 y ( x1 )  

 x 2  x0
 x  x1 

 y ( x 2 ),
 x 2  x1 
x0  x  x 2
(1.10  1.28)(1.10  0.66)
(1.10  2.20)(1.10  0.66)
(0.00) 
(0.88)
(2.20  1.28)(2.20  0.66)
(1.28  2.20)(1.28  0.66)
(1.10  2.20)(1.10  1.28)
(1.14)

(0.66  2.20)(0.66  1.28)
 (0.055901)(0.00)  (0.84853)(0.88)  (0.20737)(1.14)
 0.98311 in.
The absolute relative approximate error a obtained between the results from the first and
y (1.10) 
second order polynomial is
0.98311  0.95548
a 
 100
0.98311
 2.8100%
4
3
5
2
6
y
7
1
x
Download