Go to CCP Homepage Go to Materials Page Go to Integral Calculus Materials Go to Table of Contents
Go Back One Page Go Forward One Page

Numeric Computation of Integrals

Part 4: Accuracy and Simpson's Rule

In this Part, we will investigate the accuracy of the approximation methods we have studied so far and then try to discover more accurate approximations by using weighted averages.

The table below records in its third column the exact value of the integral of the function f(x) = (x2 + 5)/6 over the interval [0, 5]. The value to four decimal places is 11.1111. This is the exact area under the curve shown under the "parabola" function in the applets.

We have used the applet in Part 1 to compute the left-hand sum and right-hand sum approximations to the integral using n = 40 subintervals and filled the numbers into the table. The error column is computed by subtracting the exact value of the integral from the approximate value.

Method Approximation Exact Integral Error
LHS 10.8529 11.1111 -0.2582
RHS 11.3737 11.1111 0.2626
TRAP 11.1111
MID 11.1111

  1. Use the Fundamental Theorem of Calculus to check that the exact value of the integral of the function f(x) = (x2 + 5)/6 over the interval [0, 5] is 100/9, which is 11.1111 to four decimal places.
  2. Use the applet in Part 1 to verify the the first two rows of the table are filled in correctly. Then use the trapezoidal sums applet in Part 2 and the midpoint rule applet in Part 3 to compute the entries in rows three and four of the table. Use n = 40 subintervals in each case. Fill in the copy of the table that appears in your helper application "notebook."
  3. We have used four approximation methods to find the area under the "parabola" function. Make a list that ranks the four methods in order of their accuracy on this problem, from least accurate to most accurate.
  4. To gather more evidence about the accuracy of the methods, fill in a table in your helper application "notebook" like the one above for the function f(x) = 1/x on the x-interval [1,3] using the n = 40 row of the tables you already filled in for this function in Parts 1 through 3. The exact area, according to the Fundamental Theorem of Calculus is ln(3), or 1.098612289 to ten places. (Check this!) Again, make a list ranking the four methods in order of their accuracy on this problem, from least accurate to most accurate. Is your ranking the same as your previous ranking?
  5. Inspecting the errors in the left-hand sums and right hand sums, you should find that these errors are about the same in magnitude but of opposite sign. Theoretical considerations will verify this fact in general. Thus, if we compute the average (LHS + RHS)/2, the errors will tend to cancel each other and yield a much smaller error. We proved in Part 2 that (LHS + RHS)/2 gives the same result as the trapezoidal sum. Thus, because of the cancellation in errors, it will be much more accurate than either the LHS or the RHS. In fact, check that averaging the errors in the LHS and RHS gives the error in your tables for the trapezoidal sum.
  6. You can see from inspecting the errors in the trapezoidal sum and the midpoint sum that the midpoint sum is about twice as accurate as the trapezoidal sum and opposite in sign. This observation can be verified from theoretical considerations. If we do a weighted average

    S = (2*MID + TRAP)/3,

    we will have cancellation of the errors in MID and TRAP and should thus get a much more accurate approximation.

    Compute the weighted average S approximation for the two functions in your tables. Compute the errors in the S approximations by subtracting the exact value of each integral from your approximations. The accuracy with only n = 40 subintervals should be outstandingly good. This approximation is called Simpson's Rule.

  7. Using weighted averages of your trapezoidal sum results of Part 2 and midpoint sum results of Part 3, fill in the table of Simpson's Rule approximations of the integral of f(x) = 1/x over the interval [1,3] for n = 5, 10, 20, and 40*.
  8. *Technically, most texts say that our n = 5 Simpson's rule should really be called the n = 10 Simpson's Rule because we have to do n = 20 evaluations of the function when we total the MID and TRAP evaluations. Likewise, n = 20 should be n = 40, etc.

Go to CCP Homepage Go to Materials Page Go to Integral Calculus Materials Go to Table of Contents
Go Back One Page Go Forward One Page


| CCP Home | Materials | Integral Calculus | Module Contents | Back |Forward |

modules at math.duke.edu Copyright CCP and the author(s), 1999