Forming Riemann Sums

So far we have been using rectangles to approximate the area under a curve. The heights of these rectangles have been determined by evaluating the function at either the right or left endpoints of the subinterval \(\left[\right. x_{i - 1} , x_{i} \left]\right. .\) In reality, there is no reason to restrict evaluation of the function to one of these two points only. We could evaluate the function at any point \(x_{i}^{\star}\) in the subinterval \(\left[\right. x_{i - 1} , x_{i} \left]\right. ,\) and use \(f \left(\right. x_{i}^{\star} \left.\right)\) as the height of our rectangle. This gives us an estimate for the area of the form

\[A \approx \sum_{i = 1}^{n} f \left(\right. x_{i}^{\star} \left.\right) \Delta x .\]

A sum of this form is called a Riemann sum, named for the 19th-century mathematician Bernhard Riemann, who developed the idea.

Definition

Let \(f \left(\right. x \left.\right)\) be defined on a closed interval \(\left[\right. a , b \left]\right.\) and let P be a regular partition of \(\left[\right. a , b \left]\right. .\) Let Δx be the width of each subinterval \(\left[\right. x_{i - 1} , x_{i} \left]\right.\) and for each i, let \(x_{i}^{\star}\) be any point in \(\left[\right. x_{i - 1} , x_{i} \left]\right. .\) A Riemann sum is defined for \(f \left(\right. x \left.\right)\) as

\[\sum_{i = 1}^{n} f \left(\right. x_{i}^{\star} \left.\right) \Delta x .\]

Recall that with the left- and right-endpoint approximations, the estimates seem to get better and better as n get larger and larger. The same thing happens with Riemann sums. Riemann sums give better approximations for larger values of n. We are now ready to define the area under a curve in terms of Riemann sums.

Definition

Let \(f \left(\right. x \left.\right)\) be a continuous, nonnegative function on an interval \(\left[\right. a , b \left]\right. ,\) and let \(\sum_{i = 1}^{n} f \left(\right. x_{i}^{\star} \left.\right) \Delta x\) be a Riemann sum for \(f \left(\right. x \left.\right) .\) Then, the area under the curve \(y = f \left(\right. x \left.\right)\) on \(\left[\right. a , b \left]\right.\) is given by

\[A = \underset{n \rightarrow \infty}{\text{lim}} \sum_{i = 1}^{n} f \left(\right. x_{i}^{\star} \left.\right) \Delta x .\]

Media

See a graphical demonstration of the construction of a Riemann sum.

Some subtleties here are worth discussing. First, note that taking the limit of a sum is a little different from taking the limit of a function \(f \left(\right. x \left.\right)\) as x goes to infinity. Limits of sums are discussed in detail in the chapter on Sequences and Series; however, for now we can assume that the computational techniques we used to compute limits of functions can also be used to calculate limits of sums.

Second, we must consider what to do if the expression converges to different limits for different choices of \(\left{\right. x_{i}^{\star} \left.\right} .\) Fortunately, this does not happen. Although the proof is beyond the scope of this text, it can be shown that if \(f \left(\right. x \left.\right)\) is continuous on the closed interval \(\left[\right. a , b \left]\right. ,\) then \(\underset{n \rightarrow \infty}{\text{lim}} \sum_{i = 1}^{n} f \left(\right. x_{i}^{\star} \left.\right) \Delta x\) exists and is unique (in other words, it does not depend on the choice of \(\left{\right. x_{i}^{\star} \left.\right} ).\)

We look at some examples shortly. But, before we do, let’s take a moment and talk about some specific choices for \(\left{\right. x_{i}^{\star} \left.\right} .\) Although any choice for \(\left{\right. x_{i}^{\star} \left.\right}\) gives us an estimate of the area under the curve, we don’t necessarily know whether that estimate is too high (overestimate) or too low (underestimate). If it is important to know whether our estimate is high or low, we can select our value for \(\left{\right. x_{i}^{\star} \left.\right}\) to guarantee one result or the other.

If we want an overestimate, for example, we can choose \(\left{\right. x_{i}^{\star} \left.\right}\) such that for \(i = 1 , 2 , 3 ,\ldots, n , f \left(\right. x_{i}^{\star} \left.\right) \geq f \left(\right. x \left.\right)\) for all \(x \in \left[\right. x_{i - 1} , x_{i} \left]\right. .\) In other words, we choose \(\left{\right. x_{i}^{\star} \left.\right}\) so that for \(i = 1 , 2 , 3 ,\ldots, n , f \left(\right. x_{i}^{\star} \left.\right)\) is the maximum function value on the interval \(\left[\right. x_{i - 1} , x_{i} \left]\right. .\) If we select \(\left{\right. x_{i}^{\star} \left.\right}\) in this way, then the Riemann sum \(\sum_{i = 1}^{n} f \left(\right. x_{i}^{\star} \left.\right) \Delta x\) is called an upper sum. Similarly, if we want an underestimate, we can choose \(\left{\right. x_{i}^{\star} \left.\right}\) so that for \(i = 1 , 2 , 3 ,\ldots, n , f \left(\right. x_{i}^{\star} \left.\right)\) is the minimum function value on the interval \(\left[\right. x_{i - 1} , x_{i} \left]\right. .\) In this case, the associated Riemann sum is called a lower sum. Note that if \(f \left(\right. x \left.\right)\) is either increasing or decreasing throughout the interval \(\left[\right. a , b \left]\right. ,\) then the maximum and minimum values of the function occur at the endpoints of the subintervals, so the upper and lower sums are just the same as the left- and right-endpoint approximations.

Example 5.5

Finding Lower and Upper Sums

Find a lower sum for \(f \left(\right. x \left.\right) = 10 - x^{2}\) on \(\left[\right. 1 , 2 \left]\right. ;\) let \(n = 4\) subintervals.

Solution

With \(n = 4\) over the interval \(\left[\right. 1 , 2 \left]\right. , \Delta x = \frac{1}{4} .\) We can list the intervals as \(\left[\right. 1 , 1.25 \left]\right. , \left[\right. 1.25 , 1.5 \left]\right. , \left[\right. 1.5 , 1.75 \left]\right. , \left[\right. 1.75 , 2 \left]\right. .\) Because the function is decreasing over the interval \(\left[\right. 1 , 2 \left]\right. ,\) Figure 5.14 shows that a lower sum is obtained by using the right endpoints.

The graph of f(x) = 10 − x^2 from 0 to 2. It is set up for a right-end approximation of the area bounded by the curve and the x axis on [1, 2], labeled a=x0 to x4. It shows a lower sum.
Figure 5.14 The graph of \(f \left(\right. x \left.\right) = 10 - x^{2}\) is set up for a right-endpoint approximation of the area bounded by the curve and the x-axis on \(\left[\right. 1 , 2 \left]\right. ,\) and it shows a lower sum.

The Riemann sum is

\[\begin{aligned} \sum_{k = 1}^{4} \left(\right. 10 - \left(x_{k}\right)^{2} \left.\right) \left(\right. 0.25 \left.\right) & = 0.25 \left[\right. 10 - \left(\left(\right. 1.25 \left.\right)\right)^{2} + 10 - \left(\left(\right. 1.5 \left.\right)\right)^{2} + 10 - \left(\left(\right. 1.75 \left.\right)\right)^{2} + 10 - \left(\left(\right. 2 \left.\right)\right)^{2} \left]\right. \\ & = 0.25 \left[\right. 8.4375 + 7.75 + 6.9375 + 6 \left]\right. \\ & = 7.28. \end{aligned}\]

The area of 7.28 is a lower sum and an underestimate.

Checkpoint 5.5

  1. Find an upper sum for \(f \left(\right. x \left.\right) = 10 - x^{2}\) on \(\left[\right. 1 , 2 \left]\right. ;\) let \(n = 4 .\)
  2. Sketch the approximation.

Example 5.6

Finding Lower and Upper Sums for \(f \left(\right. x \left.\right) = \text{sin} x\)

Find a lower sum for \(f \left(\right. x \left.\right) = \text{sin} x\) over the interval \(\left[\right. a , b \left]\right. = \left[\right. 0 , \frac{\pi}{2} \left]\right. ;\) let \(n = 6 .\)

Solution

Let’s first look at the graph in Figure 5.15 to get a better idea of the area of interest.

A graph of the function y = sin(x) from 0 to pi. It is set up for a left endpoint approximation from 0 to pi/2 and n=6. It is a lower sum.
Figure 5.15 The graph of \(y = \text{sin} x\) is divided into six regions: \(\Delta x = \frac{\pi / 2}{6} = \frac{\pi}{12} .\)

The intervals are \(\left[\right. 0 , \frac{\pi}{12} \left]\right. , \left[\right. \frac{\pi}{12} , \frac{\pi}{6} \left]\right. , \left[\right. \frac{\pi}{6} , \frac{\pi}{4} \left]\right. , \left[\right. \frac{\pi}{4} , \frac{\pi}{3} \left]\right. , \left[\right. \frac{\pi}{3} , \frac{5 \pi}{12} \left]\right. ,\) and \(\left[\right. \frac{5 \pi}{12} , \frac{\pi}{2} \left]\right. .\) Note that \(f \left(\right. x \left.\right) = \text{sin} x\) is increasing on the interval \(\left[\right. 0 , \frac{\pi}{2} \left]\right. ,\) so a left-endpoint approximation gives us the lower sum. A left-endpoint approximation is the Riemann sum \(\sum_{i = 0}^{5} \text{sin} x_{i} \left(\right. \frac{\pi}{12} \left.\right) .\) We have

\[\begin{aligned} A & \approx \text{sin} \left(\right. 0 \left.\right) \left(\right. \frac{\pi}{12} \left.\right) + \text{sin} \left(\right. \frac{\pi}{12} \left.\right) \left(\right. \frac{\pi}{12} \left.\right) + \text{sin} \left(\right. \frac{\pi}{6} \left.\right) \left(\right. \frac{\pi}{12} \left.\right) + \text{sin} \left(\right. \frac{\pi}{4} \left.\right) \left(\right. \frac{\pi}{12} \left.\right) + \text{sin} \left(\right. \frac{\pi}{3} \left.\right) \left(\right. \frac{\pi}{12} \left.\right) + \text{sin} \left(\right. \frac{5 \pi}{12} \left.\right) \left(\right. \frac{\pi}{12} \left.\right) \\ & = 0.863. \end{aligned}\]

Checkpoint 5.6

Using the function \(f \left(\right. x \left.\right) = \text{sin} x\) over the interval \(\left[\right. 0 , \frac{\pi}{2} \left]\right. ,\) find an upper sum; let \(n = 6 .\)

This lesson is part of:

Integration

View Full Tutorial

Track Your Learning Progress

Sign in to unlock unlimited practice exams, tutorial practice quizzes, personalized weak area practice, AI study assistance with Lexi, and detailed performance analytics.