Riemann Sums and Areas (Explaining Calculus #14)

At this point in calculus, we are taking what appears to be a sharp turn in a direction completely away from what we’ve been doing so far. We now turn to talking about areas.

The Problem

Geometry is one of the most important branches of all mathematics, both theoretical mathematics and applied mathematics. When middle or high school students take classes in geometry, one of the most important focus points in those classes is calculating areas and volumes. In geometry class, the first thing you will learn is how to find the area of a triangle and of a rectangle. After that, you’ll probably learn how to do a circle. Everything else that has easy area formulas is some sort of shape that you can break down into pieces that involve triangles and rectangles.

But what about other areas? What if we want to know the area underneath, say, a parabola? What about other more complicated shapes? How might we calculate complicated areas?

The Idea of the Solution

The idea behind solving the problem of calculating complicated areas is called the Riemann sum, named after Bernard Riemann, one of the most important mathematicians perhaps of all time, certainly of the last two hundred years. The general strategy is one that is employed many, many times in many, many different areas of mathematics. The strategy basically goes as follows.

  1. Find something that we understand well that can approximate something we don’t understand well.
  2. Use that simpler thing to approximate the harder thing.
  3. Using limits, make the approximation “infinitely close”.
  4. Figure out what this “infinitely close approximation” really is.

Step 4 in this process will not be addressed in this post – it will come later. Here, we will be addressing Step 1-3, in two main stages. Stage 1 will deal with 1-2 in learning how to estimate areas of complicated shapes using much simpler shapes (namely, rectangles). In Stage 2, we will explain how to apply a limit to this approximation idea, and why this approximation really does become “infinitely close”.

Stage 1: Estimation

We have set out on a task of estimating the area of a complicated region. How might we do this? Well, if we are taking the strategy seriously, we should focus on using a very simple area. We might as well start with the simplest area formula of all – the area of a rectangle, base times height. Now, if we had a weirdly-shaped region, could we use rectangles to get an area that is approximately right? If you are reading this and haven’t heard of this concept before, try it out for yourself. Draw a circle on a piece of paper, and try to use some rectangles to get a feel for approximating the area of that circle. Or you could draw any 2-dimensional region – try using rectangles to approximate that region.

You may have come up with lots of different approaches – and that’s good! That is exploration. Here is what mathematicians have settled on as their standard method of approximating the area under the graph of a function, say y = f(x):

A visual approximation of areas underneath a graph, from https://mathworld.wolfram.com/RiemannSum.html

Notice the method – we’ve made the base of each rectangle lie along the x-axis, and all the rectangles have the same size base. This has the advantage of being very easy to set up the bases of each rectangle. The disadvantage is that it isn’t exactly clear how to set up the height of the rectangle. In this picture, the height of the rectangle is the height of the function f(x) in center of the base. To see this, in each rectangle, draw a vertical line down the middle of each rectangle. You will see that your vertical line will touch the red curve at the top (or bottom) of the rectangle.

With such a choice of the height of the rectangle, we can pretty easily set out the formula for the area of each rectangle. If the rectangle has corners at x_1, x_2 on the x-axis, then the formula for the area of this rectangle is

\text{Area} = \text{Base} \times \text{Height} = (x_2 - x_1) \times f\left( \dfrac{x_1 + x_2}{2}\right).

If we want to find the area under f(x) between, say = -0.5 and x = 0.5, then we could lay out a number of rectangles in this fashion between these two x-values and add up all the areas of the rectangles. In the image above, this has been done with 10 rectangles. The area of the 10 rectangles is calculated to be 0.187358, and the “actual area” (which we don’t know how to calculate for ourselves yet) is about 0.193198. These two numbers are pretty close together – so our approximation does seem to be working. You could convince yourself visually that, if we had used 100 rectangles instead of 10, our approximation would probably have been a great deal closer. Then, you’d expect, the more rectangles we use, the closer to the right answer our estimation should be.

This is exactly the idea that calculus allows us to take advantage of.

Stage 2: Limits

In calculus, we have the tool called the limit, which allows us to take a variable we care about and allow that variable to “approach” some limiting point without ever having to be literally equal to that limiting point. Although this hasn’t been used in quite this way yet, we can use the concept of a limit to allow a variable to approach an infinite value. When we understand how this works, we can use this idea of “limits to \infty” to calculate exact areas.

Up to this points, we mainly worked with limits going towards finite numbers. For example, the definition of the derivative f^\prime(x) is written as

f^\prime(x) = \lim\limits_{h \to 0} \dfrac{f(x+h) - f(x)}{h}.

This expression has a limit as h approaches zero. What this means is we should think about the trend of the value \dfrac{f(x+h) - f(x)}{h} for values of h like h = 1, 0.1, 0.01, 0.001, 0.0001, \dots. The value of the limit is equal to whatever number these values are trending towards. For example, if the list of numbers we got was 2, 1.5, 1.1, 1.01, 1.001, 1.0000001, \dots, then the limit would end up being exactly equal to 1.

So this is how limits to specific numbers work. But what about limits going to \infty? You can’t quite use the same idea, since you can’t really get “closer” to \infty in the same way we can with a number like zero, since all numbers are “infinitely far away” from \infty. The way we handle this is, instead of looking at trends as we let input values go through a list 1, 0.1, 0.001, 0.0001, and so on, we look at the trend as we let our input values go through a list 1, 10, 100, 1000, 10000, 100000, and so on. To be a bit more specific, when we write an expression like

\lim\limits_{x \to \infty} f(x),

what we mean is “what is the value towards which f(x) is trending as we choose super-huge values of x?”

Ok, so we have this general notion of a limit going towards infinity. What is this any good for? Well, remember that in our discussion about rectangles, we noticed that as we allow ourselves more and more rectangles in our estimation, our values will get closer and closer to correct. Using the idea of a limit going towards infinity, what if we allowed the number of rectangles we are using to approach infinity? This is the idea that we now call the Riemann sum.

To write everything down explicitly, let’s say we have a graph of a function f(x) between the points x = a and x = b on the x-axis. Let’s say we are using n rectangles to approximate the area. Then the formula for what is called the Riemann sum is often written down as

\lim\limits_{n \to \infty} \sum_{i=1}^n f(x_i^*) \Delta x.

Now, this looks a bit intimidating. To make this a bit more manageable, let’s break down the meaning of each symbol one by one. The \lim\limits_{n \to \infty} is the symbol that tells us we are using the limit going to infinity. The presence of the letter n in this limit, which we have defined as the number of rectangles we are using in our approximation, means that it is that number that we are allowing to become super-huge. The symbol \sum_{i=1}^n just means “add together a bunch of stuff”. The letter i is a kind of placeholder that keeps track of which term we are at in our sum, the 1 and n symbolize the starting and ending point of our sum. So, for instance,

\sum_{i=1}^n x_i = x_1 + x_2 + x_3 + \dots + x_n.

Thus, this \sum_{i=1}^n symbol is telling us that we are about to add together a bunch of areas of rectangles. This tells us that f(x_i^*) \Delta x_i must be the area of a rectangle. The symbol \Delta x_i is a shorthand for “the base of the rectangle”, the point x_i^* is the point that we are using to help us find the height of the rectangle (which was the midpoint in the example I gave before), and so f(x_i^*) is the height of the rectangle.

We therefore have this method for calculating areas of strange shapes exactly. The only problem is… how in the world do we evaluate such an odd looking expression? It isn’t at all obvious how to do this. If we could find a way, that would be super helpful – after all, knowing areas of weirdly shaped regions could be very helpful for all kinds of problems in real life. But we don’t know how to do that… yet. We will soon discover that a concept closely related to the derivative will come to the rescue and deliver to us an answer to our question about areas.

Conclusion

I’ve spent so much time talking about derivatives, and yet it will be several posts before they come up directly again. This may be confusing, because we will now be talking about areas – which is quite a different thing from slopes and tangent lines. And yet, a few posts from now, we will see how important derivatives are in dealing with areas. There is, in fact, possibly a visual connection you can already make between the two if you think about it for long enough. For the curious reader, see if you can think of a connection.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: