Trapezoidal Rule for Integration

Chapter 07.02
Trapezoidal Rule for Integration-More Examples
Mechanical Engineering
Example 1
A trunnion of diameter 12.363 has to be cooled from a room temperature of 80F before it
is shrink fit into a steel hub (Figure 1).
Figure 1 Trunnion to be slid through the hub after contracting.
The equation that gives the diametric contraction, in inches of the trunnion in dry-ice/alcohol
(boiling temperature is  108F ) is given by:
108
D  12.363
  1.2278  10
11
T 2  6.1946  10 9 T  6.015  10 6 dT
80
a) Use single segment Trapezoidal rule to find the contraction.
b) Find the true error, E t , for part (a).
c) Find the absolute relative true error for part (a).
Solution
a)
 f a   f b 
I  b  a 
 , where
2

a  80
b  108
f T   12.363  1.2278  10 11T 2  6.1946  10 9 T  6.015  10 6


f 80  12.363  1.2278  10
11
80
2
 6.1946  10
9

80  6.015  10 6 
 7.9519  10 5
2
f  108  12.363  1.2278  10 11  108  6.1946  10 9  108  6.015  10 6

07.02.1

07.02.2
Chapter 07.02
 6.4322  10 5
 7.9519  10 5  6.4322  10 5 
I   108  80

2


 0.013521 in
b) The exact value of the above integral is
108
D  12.363
  1.2278  10
11
T 2  6.1946  10 9 T  6.015  10 6 dT
80
 0.013689 in
so the true error is
Et  True Value  Approximat e Value
 0.013689   0.013521
 0.00016810
c) The absolute relative true error, t , would then be
True Error
 100 %
True Value
 0.00016810

 100 %
 0.013689
 1.2280 %
t 
Example 2
A trunnion of diameter 12.363 has to be cooled from a room temperature of 80F before it
is shrink fit into a steel hub (Figure 1). The equation that gives the diametric contraction, in
inches of the trunnion in dry-ice/alcohol (boiling temperature is  108F ) is given by:
108
D  12.363
  1.2278  10
11
T 2  6.1946  10 9 T  6.015  10 6 dT
80
Use two segment Trapezoidal rule to find the contraction.
a) Find the true error, E t , for part (a).
b) Find the absolute relative true error for part (a).
Solution
a) The solution using 2-segment Trapezoidal rule is

ba
 n1

I
f
(
a
)

2
 f (a  ih )  f (b)

2n 
 i 1


n2
a  80
b  108
ba
h
n
 108  80

2
Trapezoidal Rule for Integration-More Examples: Mechanical Engineering
 94

 108  80 
 21



I
f
80

2
 f a  ih   f  108

22 
 i 1


 188
 f 80  2 f 80  1   94  f  108

4
 188
 f 80  2 f  14  f  108

4
 47 7.9519  10 5  27.3262  10 5   6.4322  10 5
 0.013647 in
b) The exact value of the above integral is

108
D  12.363
  1.2278  10
11
07.02.3

T 2  6.1946  10 9 T  6.015  10 6 dT
80
 0.013689 in
so the true error is
Et  True Value  Approximat e Value
 0.013689   0.013647
 0.000042026 in
c) The absolute relative true error, t , would then be
True Error
 100 %
True Value
 0.000042026

 100 %
 0.013689
 0.30700 %
t 
Table 1 Values obtained using multiple-segment Trapezoidal rule for
108
D  12.363
  1.2278  10
11
T 2  6.1946  10 9 T  6.015  10 6 dT
80
n
Value
Et
1
2
3
4
5
6
7
8
0.013521
0.013647
0.013670
0.013679
0.013682
0.013684
0.013686
0.013687
0.00016810
 4.2026  10 5
 1.8678  10 5
 1.0506  10 5
 6.7241  10 6
 4.6695  10 6
 3.4307  10 6
 2.6266  10 6
t %
1.2280
0.30700
0.13644
0.076750
0.049120
0.034111
0.025061
0.019188
a %
--0.92328
0.16825
0.059740
0.027644
0.015014
0.0090522
0.0058749