Math 131 Grinnell College Fall, 2009
 
Section 1: MWF 8:00-8:50, T 11:00-11:50
Section 2: MTWF: 10:00-10:50
Calculus I
 

Calculus Lab: Riemann Sums and the Definite Integral

Goals

This lab helps motivate the concepts behind the definite integral. Specifically, this lab provides experience with:

Acknowledgements

This lab is based on a lab of the same title by Ed Packel from Learning by Discovery: A Lab Manual for Calculus, edited by Anita Solow, MAA Notes, 1993.

This lab uses the integrate interface, written by Professor Emily Moore for the Matlab mathematical software package.

Before the Lab

  1. Figure 1 shows the graph of a function f on the interval [a, b]. We want to write an expression for the sum of the areas of the four rectangles that will depend only upon the function f and the interval endpoints a and b.

    1. The four subintervals that form the bases of the rectangles along the x-axis all have the same length; express the width of a subinterval in terms of a and b. How many subinterval lengths is x2 away from a = x0? Write expressions for x1, x2, x3, and x4 in terms of a and b. What are the heights of the four rectangles? Multiply the heights by the lengths, add the four terms, and call the sum R(4).

      a Riemann Sum
    2. Generalize your work in part a to obtain an expression for R(n), the sum of rectangular areas when the interval [a, b] is partitioned into n subintervals of equal length and the right-hand endpoint of each subinterval is used to determine the height of the rectangle above it. Write your expression for R(n) using summation notation. In order to do this, first figure out a formula for xk, the right-hand endpoint of the kth subinterval. Then check that your formula for xk yields the value b when k takes on the value n.

    3. Let L(n) denote the sum of rectangular areas when left-hand endpoints rather than right-hand endpoints are used to determine the heights of the rectangles. Add some details to Figure 1 to illustrate the areas being summed for L(4). What modification in the expression for R(n) do you need to make to get a formula for L(n)

    4. Have your instructor check your formulas for R(n) and L(n) .

In the Lab

  1. Consider the function f(x) = 3x on the interval [1,5].

    1. In your notebook sketch a picture to illustrate this situation. Use geometry to determine the exact area A between the graph of f and the x-axis from x = 1 to x = 5.

    2. Using hand computations (perhaps with help from a calculator), apply your formulas for R(4) and L(4) to this function.

    3. We now use the integrate package within Matlab to handle the computations of L(n) and R(n). First, we duplicate the computations you just did by hand in Step 2b.


      • Log into MathLAN with your username and password for that system.

      • Start Matlab by clicking on the icon with 0's and 1's in the menu panel at the bottom of the screen.

      • We will use the integrate option; type

        
        integrate
        

        at the >> prompt.

      • The integrate package works in two parts:

        • You type commands in the text window, according to the integrate menu.
        • When you type p in the text window, the desired graph is displayed in a separate graphics window.
      • Enter the function f(x)=3x, as follows:

        • Use the e option (type e and hit return)
        • Enter
          
          3 * x
          
      • Specify the x-interval to [1, 5], using the X option and following the prompts to enter 1 and 5.
      • Rather than specifying the range of y values, use the A option to request the software to compute an appropriate range.
      • Use the G option to obtain the graph of the function.
      • Use the R option to compute Riemann sums, with these choices:
        Option Suggested Value
        Number of Intervals 4
        Use endpoints L for computing L(4)
        R for computing R(4)

        The software computes the sum (L(4) or R(4)).


    4. Change the number of intervals to 40 and use integrate to compute R(n) and L(n) for n = 40. Also, redisplay the graph with these rectangles.

      How are the sizes of R(40) and L(40), related to the area A?

    5. Repeat the computer-based computations of L(n) and R(n) for n = 400 and n = 4000. Again, redisplay the graph with these rectangles.

    6. Describe any relationship you observe between the computations L(n) and R(n) and the exact area of this region. Specifically, make a conjecture about what should happen for larger and larger values of n. Test your conjecture with a few additional values of n of your own choosing and record your results in a table.

    Throughout the rest of this lab, use integrate to approximate L(n) and R(n) for the various functions and intervals given.

    1. Consider the function f (x) = 1/sqrt(x) on the interval [.1, 10]. Plot the graph of f and use the ideas developed above to approximate the area A under the graph of f and above the given interval.

      1. Determine a reasonable estimate for this area, using R(n), L(n) for appropriate values of n.

      2. What is the relation among R(n), L(n), and the area A now?

      3. Explain any difference that you see between the situation here and the situation in Step 2.

    2. Now let f (x) = 4 - x2 on the interval [-2, 2]. Again plot the graph and estimate the area under it on this interval. How are the values of R(n) and L(n) related this time? What has changed and why? Does this prevent you from getting a good estimate of the area? Explain.

    3. So far we have worked with functions that are nonnegative on their domains. There is, however, nothing in the formulas you have developed that depends on this. Here we consider what happens geometrically when the function takes on negative values.

      1. Consider the function f (x) = 3x on the interval [-4, 2]. In your notebook sketch the graph of f on this interval and include appropriate rectangles for computing R(3) and L(3) . On subintervals where the function is negative, how are the areas of the rectangles combined in obtaining the overall value for R(3) or L(3)? What value do R(n) and L(n) seem to approach as n increases? How can you compute this value geometrically from your sketch?

      2. Now consider the function f (x) = 3x2 - 2x - 14 on the interval [2, 3]. Use your computer to plot it. Determine the value that R(n) and L(n) seem to approach. Explain with the help of your graph why you think this is happening.

    Here is a summary of the two important points so far:

    In either case the quantity that is approximated is of major importance in calculus and in mathematics. We call it the definite integral of f over the interval [a, b]. We denote it by

    definite integral

    For well-behaved functions it turns out that we can use left-hand endpoints, right-hand endpoints, or any other points in the subintervals to get the heights of the approximating rectangles. Any such sum of areas of approximating rectangles (over any partition of [a, b] into subintervals, equal in length or not) is called a Riemann sum. We obtain the definite integral as a limit of the Riemann sums as the maximum subinterval length shrinks to 0. In particular, for sums based on right-hand endpoints and equal length subintervals, we have

    limit of R(n)
    Similarly
    limit of L(n)

    Work to Turn In


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~walker/courses/131.fa09/labs/lab-riemann.shtml

created 17 June 2009
last revised 27 October 2009
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.