Approximating the Area under a Curve

Several examples given in class (on area under a curve, distance covered, and work done) turned out to have the same numerical answer, given exactly by the area of a region under a curve (and above the x-axis, and between two vertical lines that determine the interval in question), and approximated by a sum of products. These products were obtained by dividing the interval of x-values from 0 to 2 into subintervals, choosing an x-value in each of the subintervals, evaluating the function

f(x) = 1/(x4+1)

at each of these chosen x-values, and multiplying the resulting y-value by the width of the subinterval. In this piece of an Excel spreadsheet, the points of division of the interval from 0 to 2 are listed at the left (0, 0.1, 0.2, etc.). Note that all the subintervals have the same length, 0.1 -- this is not a necessary property of the subdivision, but it makes the computation easier. The next three columns are constructed as follows: Each is based on a different method for choosing x-values in the corresponding subintervals, but that choice having been made, the value displayed is the value of f at those chosen x-values. The x-values for Column B were chosen as the left endpoints of each of the corresponding subdivisions, so that the formula in, say, Cell B5 is "=1/(A5^4+1)". The x-values for Column C were chosen as the right endpoints of each of the corresponding subdivisions (one step down in the leftmost column), so that the formula in, say, Cell C5 is "=1/(A6^4+1)". And the x-values for Column D were chosen as the midpoints of each of the corresponding subdivisions (i.e., the average of the left and right endpoints), so that the formula in, say, Cell D5 is "=1/(((A5+A6)/2)^4+1)" -- as the formula in the formula bar suggests, because Cell D1 is highlighted. At the bottom of each column is the sum of the column multiplied by the common subinterval length, 0.1. (By the distributive property of multiplication over addition, we get the same thing by adding the f-values first and multiplying the sum by 0.1 as we do by multiplying each of the f-values by 0.1 and adding the products.) So we have three different estimates for the desired limit of sums of products: 1.117094, 1.022977 and 1.070174. (The value 0.058824 in the cell in Column B to the right of the 2, just above the estimate 1.117094, was not included in the sum of that column; it was used only to help draw the graph below.)

Here is a graph of the function f. One thing to note is that it is decreasing on the interval from 0 to 2, so that the maximum f-value on each subinterval appears at the left endpoint and the minimum at the right. The following graphics show how to interpret the three sums of products above as sums of rectangular areas related to this graph. Let's introduce the usual symbols for this situation, at least as many as we can in HTML: The major interval in question, here [0,2], is in general denoted [a,b]. The points of division forming the subintervals, here 0, 0.1, 0.2 and so on, are denoted x1, x2, x3, and so on. So if there are n subintervals (here there are 20), then there are n+1 points of division (21 here), including the ends x0=a and xn=b, and the i-th point of division, counting from i=0, is xi. The length of the i-th subinterval, from xi-1 to xi, is equal to xi-xi-1; in this example, each is equal to 0.1. It is usually denoted by a capital delta, i.e., an equilateral triangle, in front of xi, but a capital delta is not an HTML symbol, so I can only write it as Delta xi. And finally, the x-value chosen in the i-th subinterval from xi-1 to xi as the point at which the value of f will be found is denoted x*i. It is the different choices for x*i that give us the different approximations in Columns B, C and D in the spreadsheet above.

In this case the points x*i chosen from the subintervals are the left endpoints xi-1 of the subintervals, which for this function are the points at which the function takes on its maximum value. As a result, each of the products is the area of a rectangle (in blue) that is at least as tall as the function anywhere on that subinterval. Therefore, the region under the curve is entirely covered by the rectangles, with some small "triangle-like" pieces of the rectangles extending above the curve. Thus, the approximation of the area under the curve, 1.117094, given by this choice of x*i's is an overestimate, by the sum of the areas of those triangle-like pieces.

In this case the points x*i chosen from the subintervals are the right endpoints xi of the subintervals, which for this function are the points at which the function takes on its minimum value. As a result, each of the products is the area of a rectangle (in green) that is never taller than the function throughout that subinterval. Therefore, the rectangles are entirely covered by the region under the curve, with some small "triangle-like" pieces of the region under the curve that are not covered by the rectangles. Thus, the approximation of the area under the curve, 1.022977, given by this choice of x*i's is an underestimate, by the sum of the areas of those triangle-like pieces.

In this case the points x*i chosen from the subintervals are the midpoints (xi-1+xi)/2 of the subintervals. As a result, each of the products is the area of a rectangle (in purple) that is below the curve at the left end and above it at the right. Therefore, the total area of the triangles, 1.070174, is probably a good approximation of the area under the curve: There are some small "triangle-like" pieces of the region under the curve that are not covered by the rectangles and some small triangle-like pieces of the rectangles that are not covered by the region under the curve, and so they are likely to come close to cancelling each other out.