Skip to main content

Section 5.2 Riemann Sums and Area Approximations

One of the last things we said in Section 5.1 was that antiderivatives will be connected to areas. We’re going to eventually show this! For now, though, we want to focus on areas defined by curves.

Activity 5.2.1. Approximating Areas.

We’re going to consider two different functions, and some areas based on them. Let’s think about two functions: \(f(x)=2x+1\) and \(g(x) = x^2+1\text{.}\) For both of these functions, we’ll focus on the interval \([0,2]\text{.}\) Instead of thinking about the function only, we’ll be considering the two-dimensional region bounded between the graph of our function and the \(x\)-axis between \(x=0\) and \(x=2\text{.}\)

(a)

Find the area of the region bounded between the graph of \(f(x) = 2x+1\) and the \(x\)-axis between \(x=0\) and \(x=2\text{.}\)
A graph of the linear function f(x)=2x+1. The points (0,1) and (2,5) are marked, and there is a shaded in trapezoid shape under the line to the axis between these points.
Figure 5.2.1.
How did you evaluate this area? What kind(s) of shape(s) did you think about?

(b)

Estimate the area of the region bounded between the graph of \(g(x)=x^2+1\) and the \(x\)-axis between \(x=0\) and \(x=2\text{.}\)
A graph of the quadratic function g(x)=x^2+1. The points (0,1) and (2,5) are marked, and there is a shaded in shape under the line to the axis between these points.
Figure 5.2.2.
How did you estimate this area? What kind(s) of shape(s) did you think about?

(c)

Come up with an upper and lower bound for this area. In other words, give an underestimate and overestimate for the actual area we would like to know.
How did you come up with these estimates? How “good” do you think your estimates are? Can you come up with “better” (or closer) ones?
Hopefully we’ve had a chance to think about and compare a couple of different strategies for estimating this area. What we want to do, though, is build a systematic way of estimating this area. We’d like it to have a couple of features:
  • Easy area calculations. We don’t want to have to spend a lot of time thinking about tricky area formulas, so simple shapes will be nicer to use.
  • Flexibility. We want to be able to apply our approach to an area defined by any curve.
  • Precision. We want to be able to make our estimates as precise as we’d like. It’s fine to come up with rough estimates, but we would like a method that allows us to increase the accuracy in our estimations.

Subsection Rectangular Approximations

We’re going to revisit the same region as before, but this time we’ll outline a process that should help us approximate the area with as much precision as we’d like.

Activity 5.2.2. Approximating the Area using Rectangles.

We’re going to stick with the function \(g(x)=x^2+1\) on the interval \([0,2]\text{,}\) and keep thinking about the area bounded by the curve and the \(x\)-axis on this interval. We’re going to approximate the area in a couple of different tries, each one more accurate than the one before. By the end of this activity, we’ll have a pretty good process built!
(a)
Let’s start with approximating this region with a single rectangle. We’re going to define the rectangle by picking some \(x\)-value in the interval \([0,2]\text{.}\) Then, we’ll use the point at that \(x\)-value to define the height of our rectangle.
Essentially, we are picking a single point on our function on the interval, and our approximation is pretending that the single point we picked is representative of the whole function on the interval.
(b)
Can you try repicking an \(x\)-value, and try to find one that gets you an area approximation that is pretty good?
(c)
We’re going to use more rectangles. Let’s jump up to 3 rectangles. If we split up the interval between \(x=0\) and \(x=2\) into 3 rectangles, we can make them all the same width, and pick an \(x\)-value that we can use to get a representative point for each of the 3 rectangles.
We’ll need to pick 3 \(x\)-values this time.
(d)
Can you try repicking your \(x\)-values, and trying to find one that gets you an area approximation that is pretty good?
(e)
Let’s scale this up a bit. Pick a good number for your number of rectangles. We’ll call this value \(n\text{.}\)
(If you’re working in a classroom, maybe it would be good to pick the number of groups or the number of students, or some other number between 10 and 20 or something like that.)
For your value \(n\text{,}\) we’re going to divide up the interval between \(x=0\) and \(x=2\) into \(n\) pieces. These will be the intervals that we pick from to get our rectangles. What are the subintervals? What are the widths of each subinterval (and then the widths of the rectangles)? Call this with \(\Delta x\text{.}\)
(f)
For each subinterval, pick an \(x\)-value in the subinterval to represent it.
(g)
Evaluate the function \(f(x)=x^2+1\) at each of the \(x\)-values you picked. These are the heights of your rectangles!
(h)
Find the areas of each rectangle by multiplying the height of each rectangle by \(\Delta x\text{,}\) the width of each rectangle.
(i)
Add these areas up to get a total approximation of the actual area!
What do you think: is it worth fiddling with what \(x\)-value to pick from each subinterval to try to get a better approximation? If \(n\) is large, do you think it matters how we pick the \(x\)-values from each subinterval?
This is our process! We’ll refer to it often as the slice-and-sum process, since we are slicing our region into a bunch of pieces, approximating the area on each piece (by using one point to represent the whole slice), and then summing the areas back up.
More formally, we can call this the Riemann Sum process, because the sum of the areas is a special form of summation.

Definition 5.2.3. Riemann Sum.

For a closed interval \([a,b]\) with a partition \(\{x_0, x_1, ..., x_n\}\) with \(a=x_0 \lt x_1\lt ...\lt x_n=b\text{,}\) consider some \(x_k^*\text{,}\) any \(x\)-value in the interval \([x_{k-1}, x_k]\) and \(\Delta x_k\text{,}\) the length of the interval \([x_{k-1}, x_k]\text{.}\) If \(f\) is a function that is defined on the interval \([a,b]\text{,}\) then we call the sum
\begin{equation*} \sum_{k=1}^n f(x_k^*) \Delta x_k = f(x_1^*) \Delta x_1 + f(x_2^*)\Delta x_2 + ... + f(x_n^*) \Delta x_n \end{equation*}
a Riemann Sum for \(f\) on \([a,b]\text{.}\)

Note 5.2.4.

In practice, we typically choose a Regular Partition, where each subinterval \([x_{k-1}, x_k]\) is equally-wide, and so \(\Delta x_k = \frac{b-a}{n}\) for every \(k=1,2,...,n\text{.}\) We then normally write our Riemann sum as
\begin{equation*} \sum_{k=1}^n f(x_k^*) \Delta x = f(x_1^*) \Delta x + f(x_2^*)\Delta x + ... + f(x_n^*) \Delta x \end{equation*}
where \(\Delta x\) is the value of the widths of all of the equally-sized subintervals.

Subsection Selection Strategies

This is great! We have a scalable way to approximate areas, and it seems like we can pretty easily increase the precision of our approximations by increasing \(n\text{,}\) the number of slices/rectangles that we use. And the great thing about this is that when we do increase \(n\text{,}\) we don’t increase the complexity of our calculations!
Sure, it would be tedious to calculate and add 100 areas of rectangles by hand, but those area calculations don’t get more difficult: there are just more of them.
The only real downside is that when we increase the number of slices/rectangles, we are really increasing the number of decisions that we have to make: we have to choose an \(x_k^*\) for each subinterval, and so while it isn’t hard to just calculate a bunch of areas and add them up, it is difficult, on a human level, to make a bunch of decisions about which \(x\)-value to choose from each subinterval. But this decision isn’t even that important!
We use the “star” notation on the \(x_k^*\) to represent the fact that it really doesn’t matter which \(x\)-value gets chosen from the subinterval: as long as we pick one, we get an approximation! And when \(n\) increases, it matters less and less what the actual \(x\)-value is: as long as our function \(f(x)\) is continuous, then there will be not much variation among the \(y\)-value outputs for any \(x\)-values in each (small) interval!
All of this to say: let’s make a single decision about picking \(n\) \(x\)-values from \(n\) subintervals instead of having to make \(n\) decisions (one for each \(x\)-value).

Left, Right, and Midpoint Riemann Sums.

When we build a Riemann sum, we can make a choice to systematically choose the values for \(x_k^*\) (for \(k=1,2,..., n\)). There are many ways of doing this, but here are three:
  • Left Riemann Sum: We pick the left-most \(x\)-value from each subinterval. That is, if the partition is \(\{a=x_0, x_1, x_2, ..., b=x_n\}\text{,}\) then we choose \(\{a, x_1, x_2, ..., x_{n-1}\}\) as our \(x\)-values to evaluate \(f\) at for the rectangle heights.
    We refer to these as \(L_n\text{,}\) a Left Riemann sum with \(n\) rectangles.
  • Right Riemann Sum: We pick the right-most \(x\)-value from each subinterval. That is, if the partition is \(\{a=x_0, x_1, x_2, ..., b=x_n\}\text{,}\) then we choose \(\{x_1, x_2, ..., b\}\) as our \(x\)-values to evaluate \(f\) at for the rectangle heights.
    We refer to these as \(R_n\text{,}\) a Right Riemann sum with \(n\) rectangles.
  • Midpoint Riemann Sum: We pick the \(x\)-value that is in the middle of each subinterval. That is, if the partition is \(\{a=x_0, x_1, x_2, ..., b=x_n\}\text{,}\) then we choose \(\left\{\frac{a+x_1}{2}, \frac{x_1+x_2}{2}, ..., \frac{x_{n-1}+b}{2}\right\}\) as our \(x\)-values to evaluate \(f\) at for the rectangle heights.
    We refer to these as \(M_n\text{,}\) a Midpoint Riemann sum with \(n\) rectangles.
None of this is a requirement for a Riemann sum, but we will consistently find that when we limit the number of decisions that we have to make, the complexity of the calculation decreases.
Notice that we’ve already made a similar choice with how we calculate \(\Delta x\text{:}\) it is not required that each rectangle have the same width, but it is very nice to not have to think about \(n\) different widths!
Lastly, we’ll finish with a nice interactive Riemann sum calculator. Feel free to explore some different graphs and see how the Riemann sums work when we change how we select the values for \(x_k^*\) as well as when we change the number of rectangles, \(n\text{.}\)

Practice Problems Practice Problems

1.

Explain in words how we will approximate the area bounded between a function and the \(x\)-axis between two \(x\)-values, \(x=a\) and \(x=b\text{.}\)

2.

Consider the function \(f(x) = x^2+1\) on the interval \([0,2]\text{.}\)
(a)
Divide the interval \([0,2]\) into 5 equally sized subintervals.
(b)
What is the width of each subinterval, \(\Delta x\text{?}\)
(c)
Pick an \(x\)-value from each of the subintervals. Label them \(x_1^*, x_2^*, ..., x_5^*\text{.}\)
(d)
Find the function outputs at each of the \(x_k^*\) values for \(k=1,2,...,5\text{,}\) \(f(x_1^*), f(x_2^*), ..., f(x_5^*)\text{.}\)
(e)
Multiply each of the function values above by \(\Delta x\text{.}\)
(f)
Add each of the values above together.
(g)
Interpret this sum. What does this represent? What does it approximate?
(h)
Draw the Riemann sum you built above. Your graph should include the graph of \(f(x) = x^2+1\) as well as 5 rectangles, with heights defined by the points you found above.

3.

Let’s consider a function \(f(x)\) that is continuous on some interval \([a,b]\text{.}\)
(a)
In the construction of a Riemann sum, we use \(x\)-values notated \(x_k^*\text{.}\) What are these? Explain them.
(b)
What does it mean to construct a Left Riemann sum?
(c)
What does it mean to construct a Right Riemann sum?
(d)
What does it mean to construct a Midpoint Riemann sum?

4.

Consider the function \(g(x)\) with the following function values.
Table 5.2.5. Function values for \(g(x)\)
\(x\) \(0\) \(0.5\) \(1\) \(1.5\) \(2\) \(2.5\) \(3\) \(3.5\) \(4\)
\(g(x)\) \(0\) \(2\) \(-4\) \(7\) \(0.5\) \(-1\) \(3.5\) \(-3\) \(1\)
(a)
Approximate the area bounded between the curve \(y=g(x)\) and the \(x\)-axis between \(x=0\) and \(x=4\) using a Right Riemann sum with \(n=4\) rectangles (\(R_4\)).
(b)
Approximate the area bounded between the curve \(y=g(x)\) and the \(x\)-axis between \(x=0\) and \(x=4\) using a Left Riemann sum with \(n=4\) rectangles (\(L_4\)).
(c)
Approximate the area bounded between the curve \(y=g(x)\) and the \(x\)-axis between \(x=0\) and \(x=4\) using a Midpoint Riemann sum with \(n=4\) rectangles (\(M_4\)).
(d)
Approximate the area bounded between the curve \(y=g(x)\) and the \(x\)-axis between \(x=0\) and \(x=4\) using a Right Riemann sum with \(n=8\) rectangles (\(R_8\)).
(e)
Approximate the area bounded between the curve \(y=g(x)\) and the \(x\)-axis between \(x=0\) and \(x=4\) using a Left Riemann sum with \(n=8\) rectangles (\(L_8\)).

5.

Evaluate the following Riemann sums to approximate areas described. Sketch a picture of the region and Riemann sum for each.
(a)
The area bounded by the graph of \(f(x) = \dfrac{x^3}{2} - 3x^2 + 4x +2\) and the \(x\)-axis between \(x=0\) and \(x=2\) using an \(L_5\) Riemann sum.
(b)
The area bounded by the graph of \(g(x) = \dfrac{x^3}{2} - 3x^2 + 4x +2\) and the \(x\)-axis between \(x=2\) and \(x=4\) using an \(R_3\) Riemann sum.
(c)
The area bounded by the graph of \(j(x) = \sqrt{x}-x\) and the \(x\)-axis between \(x=0\) and \(x=1\) using an \(L_4\) Riemann sum.
(d)
The area bounded by the graph of \(j(x) = \sqrt{x}-x\) and the \(x\)-axis between \(x=0\) and \(x=1\) using an \(M_4\) Riemann sum.
(e)
The area bounded by the graph of \(j(x) = \sqrt{x}-x\) and the \(x\)-axis between \(x=0\) and \(x=2\) using an \(R_5\) Riemann sum.

6.

Consider a function that is increasing on the interval \([a,b]\text{.}\) Will a Left Riemann sum overapproximate or underapproximate the true area bounded between the curve of \(f(x)\) and the \(x\)-axis on the interval \([a,b]\text{?}\) What about a Right Riemann sum?

7.

Consider a function that is decreasing on the interval \([a,b]\text{.}\) Will a Left Riemann sum overapproximate or underapproximate the true area bounded between the curve of \(f(x)\) and the \(x\)-axis on the interval \([a,b]\text{?}\) What about a Right Riemann sum?

8.

For each pair of Riemann sums, explain which one you think most accurately estimates the area under the curve \(f(x)\) from \([a,b]\text{,}\) or explain why it is impossible or difficult to tell.