Riemann Sums

Suppose we want to calculate the area under the curve from to . See the picture below. What we do is draw a number of rectangles and add up their areas to approximate the true area under the curve. Try dragging the slider, and notice that the more rectangles we draw, the better the approximation we get.

Suppose . This means we have 5 rectangles, each of width . The height of the rectangle will be the value of the function at the left endpoint of the rectangle: ; or . The estimate of the area is thus $$0.2(0^2 + 0.2^2 + 0.4^2 + 0.6^2 + 0.8^2) = 0.24.$$

If we used right endpoints, the sum would be $$0.2(0.2^2 + 0.4^2 + 0.6^2 + 0.8^2 + 1^2) = 0.44.$$

Notice that the left sum (let's call it ) is less than the right sum (let's call it ). This doesn't always happen, but it does happen for an increasing function, such as . In this case, we can take the average, or , as a better estimate. (We could also use the midpoints of the rectangles for the heights.) As we will see below, the true area is .

Here is the notation: is the width of each rectangle. is the -value of the left endpoint of the th rectangle, and is the -value of the right endpoint of the th rectangle, for . Sometimes is used to denote any point between and (for example, the midpoint . The formulas for these are below, given that we want the area under from to :

These sums of rectangles to approximate areas under curves are called Riemann Sums. A few other formulas that come in handy appear below:

Here, is simply shorthand for . For example, is the same as .

In order to get the exact area, we let and take the limit. That is, we compute $$A = \lim_{n \to \infty} \sum_{i=1}^n f(x_i^*)\Delta x,$$ where is any number in the interval .

Example: Continuing with the discussion above, let's compute the exact area under over . We know and . Let's use left endpoints for the sum. We then want to compute $$\sum_{i=1}^n \frac{1}{n}\left(\frac{i}{n}\right)^2 = \frac{1}{n}\sum_{i=1}^n \frac{i^2}{n^2} = \frac{1}{n^3}\sum_{i=1}^n i^2.$$

We can pull anything that doesn't depend on outside of the sum, which is what we did above. Now since , our sum is equal to $$\frac{1}{n^3}\frac{n(n+1)(2n+1)}{6} = \frac{n}{n}\frac{n+1}{n}\frac{2n+1}{6n}.$$

The final step is to calculate $$\lim_{n \to \infty} \frac{n}{n}\frac{n+1}{n}\frac{2n+1}{6n} = 1 \times 1 \times \frac{2}{6} = \frac{1}{3}.$$ Indeed, our previous estimate of was not far off.

In general, the process is the following:

  1. Calculate and and set up the sum . For , you can use left endpoints, right endpoints, midpoints, or anything else. Frequently left or right endpoints are simplest to work with.
  2. Evaluate the sum. You will get an answer in terms of .
  3. Take the limit as .

Quiz: Find the area under the curve from to .