Page 268 - Calculus Demystified
P. 268

Applications of the Integral
                     CHAPTER 8
                     of the error estimate and, perhaps more importantly, an extra factor of k in the  255
                     denominator.]
                         EXAMPLE 8.29
                         Calculate the integral

                                                      1   2
                                                       e −x  dx
                                                     0
                         to two decimal placesof accuracy.
                         SOLUTION
                                                                              2

                           We first calculate that if f(x) = e −x 2  then f (x) = (4x − 2)e −x  2  and

                         therefore |f (x)|≤ 2 = M for 0 ≤ x ≤ 1. In order to control the error, and to
                         have two decimal places of accuracy, we need to have
                                               M · (b − a) 3
                                                           < 0.005
                                                   12k 2
                         or
                                                2 · 1 3
                                                      < 0.005.
                                                12k 2
                         Rearranging this inequality gives
                                                    100     2
                                                        <k .
                                                     3
                         Obviously k = 6 will do.
                           So we will use the partition P ={0, 1/6, 1/3, 1/2, 2/3, 5/6, 1}. The corres-
                         ponding trapezoidal sum is
                                      1/6  $   2         2          2         2
                                  S =     · e −0  + 2e −(1/6)  + 2e −(1/3)  + 2e −(1/2)
                                        2
                                                                       %
                                                     2
                                                               2
                                                                      2
                                            + 2e −(2/3)  + 2e −(5/6)  + e −1  .
                         Some tedious but feasible calculation yields then that
                                         1
                                    S =    ·{1 + 2 · .9726 + 2 · .8948 + 2 · .7880
                                         12
                                             + 2 · .6412 + 2 · .4994 + .3679}
                                         8.9599
                                      =        = .7451.
                                          12
                         We may use a computer algebra utility like Mathematica or Maple to
                         calculate the integral exactly (to six decimal places) to equal 0.746824. We thus
                         see that the answer we obtained with the Trapezoid Rule is certainly accurate
                         to two decimal places. It is not accurate to three decimal places.
   263   264   265   266   267   268   269   270   271   272   273