BrownMath.com → Calculus → Upper and Lower Sums
Updated 22 Oct 2020

# Area by Upper and Lower Sums

Copyright © 2003–2022 by Stan Brown, BrownMath.com

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? 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 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. 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 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. 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 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. 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

please click to donate!
BrownMath.com/donate.

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+j)²/n².

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−1+j)²/n².

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 circumscribedrectangle jth inscribedrectangle (n − 1 + j) · 2/n (n − 1 + j) · 2/n 2 / n 2 / n 12(n + j)²/n² 12(n − 1 + j)²/n² 24(n + j)²/n³ 24(n − 1 + j)²/n³

### “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) = 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) = .

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

S(n) = . 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) = .

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

S(n) = .

Then distribute the 4/n² to get

S(n) = .

Let’s update our table of results:

Number of
rectangles, n
124any n
Upper sum, S(n)967565.2556 + 36/n + 4/n²
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 24(n − 1 + j)²/n³, and therefore the total area of all n rectangles is

S(n) = .

Factor out 24/n³ and expand the trinomial:

S(n) = Group terms by powers of j, the summation index variable:

S(n) = Now apply the summation formulas given above:

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

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

S(n) = S(n) = Once again let’s update our table of results:

Number of
rectangles, n
124any n
Upper sum, S(n)967565.2556 + 36/n + 4/n²
Lower sum, S(n)243947.2556 − 36/n + 4/n²

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 − 36/n + 4/n² and S(n) = 56 + 36/n + 4/n² 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: .

Number of
rectangles, n
124any nlimit as n→∞
Upper sum, S(n)967565.2556 + 36/n + 4/n²56
Lower sum, S(n)243947.2556 − 36/n + 4/n²56

## 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.

## What’s New?

• 22 Oct 2020: Convert document to HTML5, clean up formatting of tables.
• 23 July 2012: Fix errors kindly reported by Brian Jones: “lower sum” was repeated for upper sum; a sentence starting with a lower-case letter; “circumscribed” for inscribed; supply the missing “6” in the second term of an equation.
• (intervening changes suppressed)
• 2 Aug 2003: New article.
{"ft_lang_label":"__label__en","ft_lang_prob":0.90362406,"math_prob":0.992675,"size":11497,"snap":"2022-40-2023-06","text_gpt3_token_len":3347,"char_repetition_ratio":0.17715131,"word_repetition_ratio":0.0863472,"special_character_ratio":0.3062538,"punctuation_ratio":0.120272316,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99947554,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"im_url_duplicate_count":[null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-03T02:39:46Z\",\"WARC-Record-ID\":\"<urn:uuid:7f0ef95f-0326-441d-a916-328b090b801e>\",\"Content-Length\":\"24736\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e99a1c13-65a2-49f7-b599-9955dca63756>\",\"WARC-Concurrent-To\":\"<urn:uuid:9923e731-39b1-490e-a9fd-0c37f9a72cb8>\",\"WARC-IP-Address\":\"35.208.145.118\",\"WARC-Target-URI\":\"http://brownmath.com/calc/ulsum.htm\",\"WARC-Payload-Digest\":\"sha1:J7V5NGAFOEUDQDYRH6JWDWNHG7GSAM4Y\",\"WARC-Block-Digest\":\"sha1:ZMVDDYS2BBVR3ZNC4HEVAEV4FIYF3UV4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337371.9_warc_CC-MAIN-20221003003804-20221003033804-00732.warc.gz\"}"}