TC3 → Stan Brown → Calculus → Upper and Lower Sums
revised 23 Jul 2012 (What’s New?)

Area by Upper and Lower Sums

Copyright © 2003–2014 by Stan Brown, Oak Road Systems

Summary: To compute the area under a curve, we make approximations by using rectangles inscribed in the curve and circumscribed on the curve. The total area of the inscribed rectangles is the lower sum, and the total area of the circumscribed rectangles is the upper sum. By taking more rectangles, you get a better approximation. In the limit, as the number of rectangles increases “to infinity”, the upper and lower sums converge to a single value, which is the area under the curve. This process is illustrated with the area under the curve y = 3x² between x = 2 and x = 4.

What’s Our Goal?

graph of y = 3x squared, x = 2 to 4 shaded We want to find the area between the curve y = 3x² and the x axis, for x in the closed interval 2 to 4, namely the shaded region shown in the picture at the right.

What’s Our Strategy?

When you don’t know how to solve a problem exactly, sometimes it’s better than nothing just to get an approximate solution — even a bad approximation can be better than none. That may show you how to make a better approximation.

That’s exactly what we’ll do. We’ll try to box in the area under the curve with some rectangles, and then modify them to get progressively closer to the actual answer.

A First Attempt

graph of y = 3x squared, shaded rectangle 48 units high from x=2 to x=4 Let’s take plain rectangles as our starting point. We shade in the area for the circumscribed rectangle, the rectangle that just holds the highest point of the curve. Its width is 2 (2 ≤ x ≤4) and its height is 48. Why 48? Because the highest point on the curve in the region 2 ≤ x ≤ 4 is at x = 4 and y = 3·4² = 48.

Since the rectangle is 2 units wide and 48 units high, its area is 2×48 = 96. Obviously this is an upper bound, meaning that the area under the curve must be less than 96.

graph of y = 3x squared, shaded rectangle 12 units high from x=2 to x=4 Can we establish a lower bound? Yes, it will be the area of the inscribed rectangle, the rectangle that just fits under the lowest point of the curve. Within the region 2 ≤ x ≤ 4, that lowest point is where x = 2 and y = 3×2² = 12. Therefore the area of the inscribed rectangle is 2×12 = 24, and 24 is a lower bound for the area under the curve.

At this point all we know is that the area under the curve must be between 24 and 96. That’s an awfully wide range; can we refine our estimates?

It’s More Fun with Twins

graph of y=3x squared, shaded rectangles 27 units high from x=2 to x=3 and 48 units high from x=3 to x=4 Yes, we can use two rectangles. First let’s look at the circumscribed rectangles. Since the total width is 4−2 = 2, each rectangle is 1 unit wide.

How high are they? Well, their edges are at x = 2, 3, and 4. You can see that the rectangles must have the same height as the curve at their right edges, namely at x = 3 and x = 4. When x = 3, y = 3×3² = 27; we already know that y = 48 at x = 4.

The two rectangles have areas of 1×27 = 27 and 1×48 = 48. The sum of those areas is 27+48 = 75. That’s called an upper sum, the sum of the areas of circumscribed rectangles. Since there are two rectangles, we write S(2) = 75 to indicate that the upper sum using the areas of two rectangles is 75. Obviously the area under the curve cannot be greater than 75.

graph of y=3x squared, shaded rectangles 12 units high from x=2 to x=3 and 27 units high from x=3 to x=4 Let’s play this game with two inscribed rectangles. Just as with the circumscribed rectangles, their widths are 1 and their edges are at x = 2, 3, and 4. The low points of the curve coincide with the left edges of the rectangles, at the points (2, 12) and (3, 27). Therefore the areas of the rectangles are 1×12 = 12 and 1×27 = 27, and the total or lower sum is s(2) = 12+27 = 39. (The lower sum is written with a lower-case s to distinguish it from the upper sum’s upper-case S.)

Here’s what we have so far:

Number of
rectangles, n
12
Upper sum, S(n)9675
Lower sum, s(n)2439

Based on two circumscribed or two inscribed rectangles, the area under the curve y = 3x², from x = 2 to x = 4, is between 39 and 75 square units.

Double Your Pleasure

xy = 3x²
2.012.00
2.518.75
3.027.00
3.536.75
4.048.00

graph of y=3x squared, four shaded rectangles with width .5 each and heights 18.75, 27, 36.75, and 48 You see how this is going. If two rectangles are better, then four must be better still. Since four rectangles have a total width of 2 units, each one is 2÷4 = .5 unit wide. For circumscribed rectangles, the height is the high point on the curve which comes at the right-hand edge of each rectangle. Consult the table of function values at the right and you see that the heights of the four rectangles are 18.75, 27, 36.75, and 48.

The areas must be .5 times those numbers, or 9.375, 13.5, 18.375, and 24. The total area, the upper sum, is S(4) = 65.25.

graph of y=3x squared, four shaded rectangles with width .5 each and heights 12, 18.75, 27, and 36.75 What about the lower sum? The four inscribed rectangles have the same width, .5 each. From the table of values you see that their heights are 12, 18.75, 27, and 36.75. Therefore their areas are 6, 9.375, 13.5, and 18.375. The total area of the four inscribed rectangles, the lower sum, is s(4) = 47.25.

Let’s update our table of results:

Number of
rectangles, n
124
Upper sum, S(n)967565.25
Lower sum, s(n)243947.25

That’s definitely progress. With one rectangle, the upper bound was 300% greater than the lower bound; with four rectangles the upper bound is only about 40% greater than the lower bound. But how many rectangles would we have to use to get an acceptably low margin of error?

We could go on taking more and more rectangles, but obviously the effort increases with greater numbers of rectangles. Maybe it makes more sense just to come up with a general expression for the area of n rectangles, and then work with that.

Upper and Lower Sums for n Rectangles

The key to writing expressions for an arbitrary number of rectangles is to think about an arbitrary rectangle. If we have n rectangles, then we can number them from 1 to n and talk about the jth rectangle, meaning any randomly chosen one.

Area of the jth Rectangle

What can we say about the jth rectangle, relative to our curve y = 3x²? For one thing, we know its width. If there are n rectangles, and their total width is 2 (from x = 2 to x = 4), then the width of any one rectangle is 2/n.

Where are the edges of the jth rectangle? Well, if each rectangle is 2/n wide then their right edges are at x = 2+2/n, 2+4/n, 2+6/n, and so on. The right edge of the jth rectangle must be at x = 2+2j/n, which we can factor as (n+j)(2/n). Its left edge must be 2/n left of that, namely (n+j)(2/n)−2/n, which we can rewrite as (n−1+j)(2/n).

What about the height of the jth rectangle? This has two answers, depending on whether we’re talking about the circumscribed rectangle used for upper sum, or the inscribed rectangle used for lower sum. For the circumscribed rectangle, the height is the y value of the high point on the curve within that rectangle, which is simply the y value of the right edge. Look back at the picture for two or four circumscribed rectangles if you’re having trouble visualizing that.

Since the x value of that right edge, and of that point on the curve, is (n+j)(2/n), the circumscribed rectangle’s height is the y value of that point, namely y = 3[(n+j)(2/n)]². That factors to 3(n+j)²(4/n²) or (12/n²)(n+j)².

For the jth inscribed rectangle, its height is the same as the y value of the low point on the curve, and that comes at the left edge of the rectangle. This makes the height of the inscribed rectangle y = 3[(n−1+j)(2/n)]² = 3(n−1+j)²(4/n²) = (12/n²)(n−1+j)².

Remember that the width of every rectangle is 2/n. To find a rectangle’s area, you multiply its width by its height, as shown in this summary table:

jth circumscribed
rectangle
jth inscribed
rectangle
Left edge, x = quantity n-1+j, times quantity 2/n
Right edge, x = quantity n+j, times quantity 2/n
Width 2 / n 2 / n
Height, y = quantity 12 over n squared, times quantity n+j quantity 12 over n squared, times quantity n-1+j
Area quantity 24 over n cubed, times quantity n+j quantity 24 over n cubed, times quantity n-1+j

“Add ’em up, Bobby!”

Okay, we’ve got the area of the jth rectangle. What about the total upper sum, the total area of the n circumscribed rectangles? That’s easy enough, in principle: just add up the area for j=1, j=2, j=3, and so on up to j=n. As you may know, there’s special sigma notation to indicate sums where an index variable varies through a set of natural numbers. We write

S(n) = described in main text

which is read aloud as “the sum as j goes from 1 to n of the expression 24 over n³ times the square of n+j”.

Now, n is a constant: the number of rectangles being summed. We haven’t specified the value of n, but it has some constant value while the areas are being added up. Therefore 24/n³ can be factored out of the summation. Also the binomial square can be multiplied out. This gives

S(n) = 24 over n cubed, times the sum as j goes from 1 to n of quantity n squared + 2 n j + j squared.

It’s okay to sum each term separately and add the results, and we get

S(n) = 24 over n cubed, times bracket the sum as j goes from 1 to n of n squared + the sum of 2 n j + the sum of j squared, close bracket.

sum of c is n times c; sum of c times j is cn times (n+1) over 2; sum of c times j squared is cn times (n+1) times (2n+1) over 6 To evaluate those sums we’ll need the general summation formulas from algebra that are shown at right. (In the formulas, c is any constant.) Using these formulas we can resolve the summations and write

S(n) = 24 over n cubed, times bracket n cubed + n squared times (n+1) over 2 + n times (n+1) times (2n+1) over 6.

Factor out n/6, cancel the 2/2 in the second fraction, and multiply out to get

S(n) = 4 over n squared, times bracket 14 n squared + 9n + 1, close bracket.

Then distribute the 4/n² to get

S(n) = 56, plus 36 over n, plus 4 over n squared.

Let’s update our table of results:

Number of
rectangles, n
124any n
Upper sum, S(n)967565.2556, plus 36 over n, plus 4 over n squared
Lower sum, s(n)243947.25 

After all that algebra, is the formula correct? Yes, we can check it by substituting in n = 1, 2, and 4. It does yield the values of 96, 75, and 65.25 that we worked out earlier.

So much for the upper sum. Now what about the lower sum, the total area of inscribed rectangles? From the chart above, the jth rectangle has an area of quantity 24 over n cubed, times quantity n-1+j, and therefore the total area of all n rectangles is

s(n) = sum as j goes from 1 to n of the expression 24 over n³ times the square of n-1+j.

Factor out 24/n³ and expand the trinomial:

s(n) = 24 over n cubed, times bracket n squared minus 2n + 1 minus 2j + 2 n j + j squared, close bracket

Group terms by powers of j, the summation index variable:

s(n) = 24 over n cubed, times sum as j goes from 1 to n of bracket quantity n squared minus 2n + 1, plus j times quantity 2n − 2, plus j squared, close bracket

Now apply the summation formulas given above:

s(n) = the same, but with the terms summed separately

s(n) = 24 over n cubed, times bracket n times (n squared minus 2n + 1), plus (2n-2) times n times (n+1) over 2, plus n times (n+1) times (2n+1) over 6, close bracket

Divide the second fraction top and bottom by 2 and factor out n/6 from the bracketed terms:

s(n) = 4 over n squared, times bracket 6 times quantity n squared minus 2n + 1, + quantity n minus 1 times quantity n+1, plus quantity n+1 times quantity 2n+1, close bracket

Multiply out and collect similar terms, then multiply through by 4/n²:

s(n) = 4 over n squared, times bracket 14 n squared minus 9 n + 1

s(n) = 56, minus 36 over n, plus 4 over n squared

Once again let’s update our table of results:

Number of
rectangles, n
124any n
Upper sum, S(n)967565.2556, plus 36 over n, plus 4 over n squared
Lower sum, s(n)243947.2556, minus 36 over n, plus 4 over n squared

To test our algebra, compute s(1), s(2), and s(4). They come out to 24, 39, and 47.25, just as we figured out earlier, and we can be pretty confident that our algebra was correct.

Take It to the Limit

After all that work, we have expressions for the upper and lower sums of n rectangles. In other words, we know that the actual area under the curve is between s(n) = 56, minus 36 over n, plus 4 over n squared and S(n) = 56, plus 36 over n, plus 4 over n squared for any integer n≥1.

But we know more than that. Look what happens to both expressions as n gets bigger. The second and third terms of each sum are fractions with n or n² in the denominator, and therefore those terms get smaller as n gets bigger.) This means that the sums get closer to 56 as n gets bigger. In other words, the limit of both sums as n increases forever (as n→∞) is 56.

But if the area under the curve is between 56 and 56, then it must be 56. For a continuous and non-negative function like our y = 3x², we define the area under the curve between two x values as the definite integral between those x values, and we write it this way: the integral from 2 to 4 of 3 x squared dx equals 56.

Number of
rectangles, n
124any nlimit as n→∞
Upper sum, S(n)967565.2556, plus 36 over n, plus 4 over n squared56
Lower sum, s(n)243947.2556, minus 36 over n, plus 4 over n squared56

Some Final Thoughts

It’s not just this particular function where the upper and lower sums have the same limit: it’s true for any continuous function that is non-negative everywhere on a particular integral.

Granted, it would be unbelievably tedious to compute the area under a curve by taking the limit of upper and lower sums. Fortunately there’s a much easier way to compute most definite integrals, using the Fundamental Theorem of Calculus. But, as Scheherazade said, that’s a story for another day.

Whats’s New?


This page is used in instruction at Tompkins Cortland Community College in Dryden, New York; it’s not an official statement of the College. Please visit www.tc3.edu/instruct/sbrown/ to report errors or ask to copy it.

For updates and new info, go to http://www.tc3.edu/instruct/sbrown/calc/