Riemann Sums

In our last post we discussed what are called Riemann sums. A sum of the form \displaystyle \sum\limits_{i=1}^{n}{f\left( x_{i}^{*} \right)\left( {{x}_{i}}-{{x}_{i-1}} \right)} or the form \sum\limits_{i=1}^{n}{f\left( x_{i}^{*} \right)\Delta x} (with the meanings from the previous post) is called a Riemann sum.

The three most common are these and depend on where the x_{i}^{*} is chosen.

  • Left-Riemann sum, L, uses the left side of each sub-interval, so x_{i}^{*}={{x}_{n-1}}.
  • Right-Riemann sum, R, uses the right side of each sub-interval, so x_{i}^{*}={{x}_{i}}.
  • Midpoint-Riemann sum, M, uses the midpoint of each interval, so x_{i}^{*}=\tfrac{1}{2}\left( {{x}_{i-1}}+{{x}_{i}} \right).

For the AP Exams students should know these and be able to compute them. The actual values are often given in a table, so the long computation of the function values is not necessary.

Another way of approximating the area between the graph and the x-axis is to use trapezoids formed by joining the points at the ends of each sub-interval. The areas can be figured individually and added or the value, T, can be found by averaging the left- and right-Riemann sums, T=\tfrac{1}{2}\left( L+R \right). This trapezoid approximation is usually closer to the true value than the other left- or right sums.

Whenever you are dealing with approximations, you should have some sense of how good they are. All of the approximations discussed will get closer to the true area if more values (more partition points) are used.

If the graph is increasing on the interval, then the left-sum is an underestimate of the actual value and the right-sum is an overestimate.  If the curve is decreasing, then the right-sums are underestimates and the left-sums are overestimates. (To see why, draw a sketch.)

If the graph is concave up the trapezoid approximation is an overestimate, and the midpoint is an underestimate. If the graph is concave down, then trapezoids give an underestimate and the midpoint an overestimate. (To see how this works, draw a sketch. For the midpoint draw the tangent line at the midpoint to the sides of the sub-interval; this trapezoid has the same area as the rectangle drawn at the midpoint of the interval. Why?)

If the graphs are not monotone on the interval or change concavity, then all bets are off.

For all of the Riemann sums, including those not mentioned above, as the number of partition points increase (n\to \infty ), or the width of the all the sub-interval decrease (\Delta x\to 0), the limit of a Riemann sum approaches the area between the graph and the x-axis. This will be the subject of the next post.


Corrected 11-28-2017


Working Towards Riemann Sums

In three previous posts (Nov 30, Dec 3 and Dec 5, 2012) we considered some examples leading up to integration and Riemann sums. Graphically all three can be seen as finding the area of the region between a graph and the x-axis over an interval.  The next thing to do is to abstract that process and see if we can do this in general for any continuous function.

Most all of the textbooks do this in the same way and that’s probably what you should now lead your students through. Start with the simple basic case of a function that is positive, monotone, and continuous on an interval [a, b]. You wish to approximate the area of the region between the graph and the x-axis with vertical sides at x = a and x = b. (The actual minimum conditions are only that the function be bounded and continuous at all but a finite number of points. But that can wait.)

Follow the steps in your textbook.

The things you should emphasize first with numbers and then eventually with symbols are these.

  1. The interval is divided into n sub-intervals each of equal length \Delta x=\frac{b-a}{n}.
  2. The x-coordinates of the endpoints are written in terms of a and \Delta x. This is called a partition of the interval. The x-coordinates are a={{x}_{0}}, {{x}_{1}}=a+(1)\Delta x, {{x}_{2}}=a+(2)\Delta x, {{x}_{3}}=a+(3)\Delta x up to {{x}_{n}}=a+(n)\Delta x=b.
  3. Decide on a scheme to evaluate the function a one point in each of the sub-intervals defined by the partition. This is usually done at the left or right endpoint, but in fact may be anywhere in the sub-interval. The notation for this “any point” is f\left( x_{i}^{*} \right), which may be a little complicated. If you decide on using the right end then for the ith sub-interval [{{x}_{i-1}},{{x}_{i}}] the value is f\left( {{x}_{i}} \right), for the left side the value is f\left( {{x}_{i-1}} \right). This is the vertical distance between the graph and the x-axis.
  4. Multiply this by the width of the sub-interval, this gives f\left( {{x}_{i}} \right)\Delta x. Do this for each sub-interval and add the results to get your approximation. For the right side approximation this looks like \sum\limits_{i=1}^{n}{f\left( {{x}_{i}} \right)\Delta x}.

Have your students compute this number for several functions with n in the 3 – 6 range. Your book will have plenty of examples. The idea is to learn and understand the procedure.

Some comments about each step above in case the kids ask. (Hope that they do.) Referring to the numbers above:

  1. The sub-intervals do not have to be the same length. When we get to taking limits of the sum above, the actual requirement is that whatever way we partition the interval the largest sub-interval (called the norm of the partition) approaches zero in length as n increases. For actually doing the computation, equal length sub-intervals are easiest.
  2. There will be a different \Delta x for each interval: \Delta {{x}_{i}}={{x}_{i}}-{{x}_{i-1}}.
  3. You may pick any point in a sub-interval, and you do not even have to pick the same way in each sub-interval. For computation, the right side is usually the easiest, with the left side not far behind. For the theory involved, picking the largest and/or smallest value in each sub-interval is used. This value may not be at an endpoint.
  4. Regardless of any of the above you will still multiply the function value by the width of the interval. The notation is more complicated. The sum is now written \sum\limits_{i=1}^{n}{f\left( x_{i}^{*} \right)\left( {{x}_{i}}-{{x}_{i-1}} \right)}

The important thing here is not the notation, but the process of partitioning the interval, calculating the function values multiplied by the width of the interval, and adding these products.

Inequalities

This is an “extra” post on a technique that students are using a lot right now in graphing functions and working on optimization problems.

In analyzing a derivative to find critical points and then the intervals where the function increases and decreases you need to solve these inequalities. I’ve observed many students solving inequalities the hard way.

By that I mean they will pick a number in each interval between the critical points and then substitute it into the derivative and do a lot of arithmetic to determine whether the derivative is positive or negative. Arithmetic is not necessary, when all you really need is the sign of the derivative. The method I suggest is easier and involves no arithmetic and therefore precludes any arithmetic mistakes

A complete discussion of this idea with examples click here or look on my Resources page.

Under is a Long Way Down

The development of the ideas and concepts related to definite integrals almost always begins with finding the area of a region between a graph in the first quadrant and the x-axis between two vertical lines. Everyone, including me in the past, refers to this as “finding the area under the curve.”

Under is a long way down. And while everyone understands what this means, I suggest that a better phrasing is “finding the area between the curve and the x-axis.” Here is why:

  • That is what you are doing.
  • You will soon be finding the area between the curve and the x-axis where the curve is below the x-axis. This often leads to something you may be tempted to call “negative area” and of course there is no such thing as a negative area, regardless of what you may find in some textbooks.

As with so many integration problems, the results is often a formula that obscures what is really going on – the Riemann sum whose value the integral gives. The first such formula is that the area is given by \int_{a}^{b}{f\left( x \right)dx}. This is correct only if  f (x) > 0. There is a natural confusion for beginning students between the facts that if f (x) < 0 the integral comes out negative, but the area is positive.

For all the applications of integration always emphasize the Riemann sum – not just the final formula. In the area problem with f (x) > 0 the integrand is the vertical length of the rectangles that make up the sum and this is the upper function’s value minus the lower function’s value, with the lower being the x-axis, y = 0. Then when f (x) < 0 the upper minus the lower is 0 – f (x) and the area is given by \int_{a}^{b}{0-f\left( x \right)dx}=-\int_{a}^{b}{f\left( x \right)dx} which is positive as it should be. And students will immediately see that \int_{a}^{b}{f\left( x \right)dx} is not automatically the area.

To help students see this you could start (very first problem) by helping them to find the area of the region between f (x) > 0 and the line y = 1 so they have to deal with the lower curve. Then consider another problem using the x-axis.

There is a fair amount of ground to cover between the first area between the curve and the x-axis problems with f (x) > 0 and other area problems. Teaching students how to set up those first Riemann sums, what a Riemann sum is, the definition of the definite integral and even the Fundamental Theorem of Calculus may all come between the first problem and when this distinction becomes important. Starting with the right words, “area between the graph and the x-axis”, will help in the long run.

Jobs, Jobs, Jobs

Here is a problem similar to those in the last two posts; this one is based on a graph. The numbers are a little hard to read (sorry), but perhaps we do not need them. (If you want to do the numbers it is the second graph from the source which is more readable. There are other graphs of this type in the source, if you want some more.)

The discussion is aimed at relating the graph which is a derivative with the net change it describes. Thus, we are looking at determining increasing, decreasing, and relative extreme value from the graph and foreshadowing how this can be done using integration concepts especially accumulation.

Source: The Bureau of Labor Statistics

Some questions to discuss.

    1. What are the units of this data, and what kind of units are they? (Thousands of jobs per month – a rate unit.)
    2. Ask the students how they would find the total change in employment over the period given and discuss this with them. (Do not make them do the computation, just discuss how.)
    3. Ask them to indicate on the graph when the total employment was the least and explain how they can tell from the graph (January 2010 – this is where the rate changes from negative to positive; this is the graph of a rate in thousands of jobs per month, therefore it is the derivative of jobs (employment)).
    4. Ask how they could verify this by computing. What would they compute month-by-month? (The total number of jobs lost or gained from the beginning of the period – the accumulated change in jobs.)
    5. During 2010 there is a local maximum in employment and another (local) minimum: when do they occur? How do you know without doing a computation?
    6. What additional information do you need to tell how many people actually had jobs at any time during this period? (The total number employed at the beginning of 2008 – the initial condition.)

Flying to Integrationland

Here is a problem similar to the one in the last post, but with foibles of its own.

The speed of an airplane in miles per hour is given at half-hour intervals in the table below. Approximately how far does the airplane travel in the three hours given in the table? How far is it from the airport?

Elapsed time (hours)   0 0.5 1 1.5 2 2.5 3
Speed  (miles per hour)    375    390    400    390    385    350    345

In addition to just finding the estimates, compare this situation with the Pump Problem from the last post. Some points to consider

    1. Answers between 1130 and 1145 miles are reasonable, if students proceed as they did with the Pump Problem. However, we cannot be sure since we do not know the speeds between the values recorded. In the Pump Problem we were told the pump was slowing down, so we could be sure the actual amount was between the values computed.
    2. Based on the information in the table what is the low and high estimates of the total distance? What assumptions do you make for these estimates? (Low = 1117.5 miles, high = 1157.5 miles assuming the plane flew at the slowest (fastest) speed in the table for the entirety of each 1/2-hour interval.)
    3. We also do not know where the plane started or which directions (plural) it was flying. So we have no way to tell how far it was from the airport (although we hope it gets to some airport eventually).
    4. What are the units? If we graph this as we did in the Pump Problem the various rectangles have dimensions of (miles/hour) by hours, so the “area” is miles (a linear unit).

Next: Jobs, Jobs, Jobs

The Old Pump

A tank is being filled with water using a pump that is old and slows down as it runs. The table below gives the rate at which the pump pumps at ten-minute intervals. If the tank initially has 570 gallons of water in it, approximately how much water is in the tank after 90 minutes?

Elapsed time (minutes)   0   10  20   30   40   50   60   70   80   90
Rate (gallons / minute)   42   40   38   35   35   32   28   20   19   10

And so begins integration.

Ask your students to do this problem alone. When they are ready (after a few minutes) collect their opinions.  They will not all be the same (we hope, because there is more than one reasonable way to approximate the amount). Ask exactly how they got their answers and what assumptions they made. Be sure they always include units (gallons).  Here are some points to make in your discussion – points that we hope the kids will make and you can just “underline.”

    1. Answers between 3140 and 3460 gallons are reasonable. Other answers in that range are acceptable. They will not use terms like “left-sum”, “right sum” and “trapezoidal rule” because they do not know them yet, but their explanations should amount to the same thing. An answer of 3300 gallons may be popular; it is the average of the other two, but students may not have gotten it by averaging 3140 and 3460.
    2. Ask if they think their estimate is too large or too small and why they think that.
    3. Ask what they need to know to give a better approximation – more and shorter time intervals.
    4. Assumptions: If they added 570 + 42(10) + 40(10) + … +19(10) they are assuming that the pump ran at each rate for the full ten minutes and then suddenly dropped to the next. Others will assume the rate dropped immediately and ran at the slower rate for the 10 minutes. Some students will assume the rate dropped evenly over each 10-minute interval and use the average of the rates at the ends of each interval (570 + 41(10) + 39(10) + … 14.5(10) = 3300).
    5. What is the 570 gallons in the problem for? Well, of course to foreshadow the idea of an initial condition. Hopefully, someone will forget to include it and you can point it out.
    6. With luck, someone will begin by graphing the data. If no one does, you should suggest it (as always) to help them see what they are doing graphically. They are figuring the “areas” of rectangles whose height is the rate in gallons/minute and whose width is the time in minutes. Thus the “area” is not really an area but a volume ((gal/min)(min) = gallons). In addition to unit analysis, graphing is important since you will soon be finding the area between the graph of a function and the x-axis in just this same manner.

Next post: Flying to Integrationland