Trapezoidal Rule for Integration

Chapter 07.02
Trapezoidal Rule for Integration-More Examples
Industrial Engineering
Example 1
A company advertises that every roll of toilet paper has at least 250 sheets. The probability
that there are 250 or more sheets in the toilet paper is given by

P( y  250)   0.3515 e 0.3881( y 252.2) dy
2
250
Approximating the above integral as
270
P( y  250)   0.3515 e 0.3881( y 252.2) dy
2
250
a) Use single segment Trapezoidal rule to find the probability that there are 250 or more
sheets.
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  250
b  270
f  y   0.3515e 0.3881 y 252.2 
2
f 250  0.3515e 0.3881250252.2 
 0.053721
2
f 270  0.3515e 0.3881270252.2 
 1.3888  1054
 0.053721  1.3888  10 54 
I  270  250

2


 0.53721
2
b) The exact value of the above integral cannot be found. For calculating the true error and
relative true error, we assume the value obtained by adaptive numerical integration using
Maple as the exact value.
270
P( y  250)   0.3515 e 0.3881( y 252.2) dy
250
 0.97377
07.02.1
2
07.02.2
Chapter 07.02
so the true error is
Et  True Value  Approximat e Value
 0.97377  0.53721
 0.43656
c) The absolute relative true error, t , would then be
t 
True Error
 100 %
True Value
0.97377  0.53721
 100 %
0.97377
 44.832 %

Example 2
A company advertises that every roll of toilet paper has at least 250 sheets. The probability
that there are 250 or more sheets in the toilet paper is given by

P( y  250)   0.3515 e0.3881( y252.2) dy
2
250
Approximating the above integral as
270
P( y  250)   0.3515 e 0.3881( y 252.2) dy
2
250
a) Use single segment Trapezoidal rule to find the probability that there are 250 or more
sheets.
b) Find the true error, E t for part (a).
c) Find the absolute relative true error for part (a).
Solution

ba
 n1

a)
I
f
(
a
)

2
 f (a  ih )  f (b)

2n 
 i 1


n2
a  250
b  270
ba
h
n
270  250

2
 10
f ( y)  0.3515e 0.3881( y 252.2)
2

270  250 
 21



f
250

2
 f a  ih   f 270

22 
 i 1


20
 f 250  2 f 250  1  10  f 270

4
I
Trapezoidal Rule-More Examples: Industrial Engineering
20
 f 250  2 f 260  f 270
4
20

0.053721  2 1.9560  10 11  1.3888  10 54
4
 0.26861
07.02.3


Since



f 250  0.3515e 0.3881250252.2 
 0.05372
2
f 270  0.3515e 0.3881270252.2 
 1.3888  1054
2
f 260  0.3515e 0.3881260252.2 
 1.9560  10 11
b) The exact value of the above integral cannot be found. For calculating the true error and
relative true error, we assume the value obtained by adaptive numerical integration using
Maple as the exact value.
2
270
P( y  250)   0.3515 e 0.3881( y 252.2) dy
2
250
 0.97377
so the true error is
Et  True Value  Approximat e Value
 0.97377  0.26861
 0.70516
c) The absolute relative true error, t , would then be
True Error
 100 %
True Value
0.97377  0.26861

 100 %
0.97377
 72.416 %
Table 1 Values obtained using multiple-segment Trapezoidal rule for
t 
270
P( y  250)   0.3515 e 0.3881( y 252.2) dy
2
250
n
Value
Et
1
2
3
4
5
6
7
8
0.53721
0.26861
0.18009
0.21815
0.50728
0.80177
0.93439
0.95768
0.43656
0.70516
0.79368
0.75562
0.46648
0.17200
0.039381
0.016092
t %
44.832
72.416
81.506
77.598
47.905
17.663
4.0442
1.6525
a %
--99.999
49.153
17.447
56.997
36.729
14.193
2.4317