Active Calculus · 4: The Definite Integral

4.2: Riemann Sums

Motivating Questions
  • How can we use a Riemann sum to estimate the area between a given curve and the horizontal axis over a particular interval?
  • What are the differences among left, right, middle, and random Riemann sums?
  • How can we write Riemann sums in an abbreviated form?

In Section 4.1, we learned that if an object moves with positive velocity v,v\text{,} the area between y=v(t)y = v(t) and the tt-axis over a given time interval tells us the distance traveled by the object over that time period. If v(t)v(t) is sometimes negative and we view the area of any region below the tt-axis as having an associated negative sign, then the sum of these signed areas tells us the moving object's change in position over a given time interval.

For instance, for the velocity function given in Figure 4.2.14.2.1, if the areas of shaded regions are A1,A_1\text{,} A2,A_2\text{,} and A3A_3 as labeled, then the total distance DD traveled by the moving object on [a,b][a,b] is

D=A1+A2+A3, D = A_1 + A_2 + A_3\text{,}

while the total change in the object's position on [a,b][a,b] is

s(b)−s(a)=A1−A2+A3. s(b) - s(a) = A_1 - A_2 + A_3\text{.}
4_2_Intro.svg
Figure 4.2.14.2.1. A velocity function that is sometimes negative.

Because the motion is in the negative direction on the interval where v(t)<0,v(t) \lt 0\text{,} we subtract A2A_2 to determine the object's total change in position.

Of course, finding DD and s(b)−s(a)s(b)-s(a) for the graph in Figure 4.2.14.2.1 presumes that we can actually find the areas A1,A_1\text{,} A2,A_2\text{,} and A3.A_3\text{.} So far, we have worked with velocity functions that were either constant or linear, so that the area bounded by the velocity function and the horizontal axis is a combination of rectangles and triangles, and we can find the area exactly. But when the curve bounds a region that is not a familiar geometric shape, we cannot find its area exactly. Indeed, this is one of our biggest goals in Chapter 4: to learn how to find the exact area bounded between a curve and the horizontal axis for as many different types of functions as possible.

In Activity 4.1.2, we approximated the area under a nonlinear velocity function using rectangles. In the following preview activity, we consider three different options for the heights of the rectangles we will use.

Preview Activity 4.2.14.2.1

A person walking along a straight path has her velocity in miles per hour at time tt given by the function v(t)=0.25t3−1.5t2+3t+0.25,v(t) = 0.25t^3-1.5t^2+3t+0.25\text{,} for times in the interval 0≤t≤2.0 \le t \le 2\text{.} The graph of this function is also given in each of the three diagrams in Figure 4.2.24.2.2.

4_2_PA1.svg

Figure 4.2.24.2.2. Three approaches to estimating the area under y=v(t)y = v(t) on the interval [0,2].[0,2]\text{.}

Note that in each diagram, we use four rectangles to estimate the area under y=v(t)y = v(t) on the interval [0,2],[0,2]\text{,} but the method by which the four rectangles' respective heights are decided varies among the three individual graphs.

  1. How are the heights of rectangles in the left-most diagram being chosen? Explain, and hence determine the value of
    S=A1+A2+A3+A4 S = A_1 + A_2 + A_3 + A_4

    by evaluating the function y=v(t)y = v(t) at appropriately chosen values and observing the width of each rectangle. Note, for example, that

    A3=v(1)⋅12=2⋅12=1. A_3 = v(1) \cdot \frac{1}{2} = 2 \cdot \frac{1}{2} = 1\text{.}
  2. Explain how the heights of rectangles are being chosen in the middle diagram and find the value of
    T=B1+B2+B3+B4. T = B_1 + B_2 + B_3 + B_4\text{.}
  3. Likewise, determine the pattern of how heights of rectangles are chosen in the right-most diagram and determine
    U=C1+C2+C3+C4. U = C_1 + C_2 + C_3 + C_4\text{.}
  4. Of the estimates S,S\text{,} T,T\text{,} and U,U\text{,} which do you think is the best approximation of D,D\text{,} the total distance the person traveled on [0,2]?[0,2]\text{?} Why?

Sigma Notation

We have used sums of areas of rectangles to approximate the area under a curve. Intuitively, we expect that using a larger number of thinner rectangles will provide a better estimate for the area. Consequently, we anticipate dealing with sums of a large number of terms. To do so, we introduce sigma notation, named for the Greek letter Σ,\Sigma\text{,} which is the capital letter SS in the Greek alphabet.

For example, say we are interested in the sum

1+2+3+⋯+100, 1 + 2 + 3 + \cdots + 100\text{,}

the sum of the first 100 natural numbers. In sigma notation we write

∑k=1100k=1+2+3+⋯+100. \sum_{k=1}^{100} k = 1 + 2 + 3 + \cdots + 100\text{.}

We read the symbol ∑k=1100k\sum_{k=1}^{100} k as “the sum from kk equals 1 to 100 of k.k\text{.}” The variable kk is called the index of summation, and any letter can be used for this variable. The pattern in the terms of the sum is denoted by a function of the index; for example,

∑k=110(k2+2k)=(12+2⋅1)+(22+2⋅2)+(32+2⋅3)+⋯+(102+2⋅10), \sum_{k=1}^{10} (k^2 + 2k) = (1^2 + 2\cdot 1) + (2^2 + 2\cdot 2) + (3^2 + 2\cdot 3) + \cdots + (10^2 + 2\cdot 10)\text{,}

and more generally,

∑k=1nf(k)=f(1)+f(2)+⋯+f(n). \sum_{k=1}^n f(k) = f(1) + f(2) + \cdots + f(n)\text{.}

Sigma notation allows us to vary easily the function being used to describe the terms in the sum, and to adjust the number of terms in the sum simply by changing the value of n.n\text{.} We test our understanding of this new notation in the following activity.

Activity 4.2.24.2.2

For each sum written in sigma notation, write the sum long-hand and evaluate the sum to find its value. For each sum written in expanded form, write the sum in sigma notation.

  1. ∑k=15(k2+2)\displaystyle \sum_{k=1}^{5} (k^2 + 2)
  2. ∑i=36(2i−1)\displaystyle \sum_{i=3}^{6} (2i-1)
  3. 3+7+11+15+⋯+27\displaystyle 3 + 7 + 11 + 15 + \cdots + 27
  4. 4+8+16+32+⋯+256\displaystyle 4 + 8 + 16 + 32 + \cdots + 256
  5. ∑i=1612i\displaystyle \sum_{i=1}^{6} \frac{1}{2^i}

When a moving body has a positive velocity function y=v(t)y = v(t) on a given interval [a,b],[a,b]\text{,} the area under the curve over the interval gives the total distance the body travels on [a,b].[a,b]\text{.} We are also interested in finding the exact area bounded by y=f(x)y = f(x) on an interval [a,b],[a,b]\text{,} regardless of the meaning or context of the function f.f\text{.} For now, we continue to focus on finding an accurate estimate of this area by using a sum of the areas of rectangles. Unless otherwise indicated, we assume that ff is continuous and non-negative on [a,b].[a,b]\text{.}

The first choice we make in such an approximation is the number of rectangles.

4_2_Interval.svg

Figure 4.2.34.2.3. Subdividing the interval [a,b][a,b] into nn subintervals of equal length Δx.\Delta x\text{.}

If we desire nn rectangles of equal width to subdivide the interval [a,b],[a,b]\text{,} then each rectangle must have width Δx=b−an.\Delta x = \frac{b-a}{n}\text{.} We let x0=a,x_0 = a\text{,} xn=b,x_n = b\text{,} and define xi=a+iΔx,x_{i} = a + i\Delta x\text{,} so that x1=x0+Δx,x_1 = x_0 + \Delta x\text{,} x2=x0+2Δx,x_2 = x_0 + 2 \Delta x\text{,} and so on, as pictured in Figure 4.2.14.2.13.

We use each subinterval [xi,xi+1][x_i, x_{i+1}] as the base of a rectangle, and next choose the height of the rectangle on that subinterval. There are three standard choices: we can use the left endpoint of each subinterval, the right endpoint of each subinterval, or the midpoint of each. These are precisely the options encountered in Preview Activity 4.2.14.2.11 and seen in Figure 4.2.14.2.12. We next explore how these choices can be described in sigma notation.

Consider an arbitrary positive function ff on [a,b][a,b] with the interval subdivided as shown in Figure 4.2.14.2.13, and choose to use left endpoints. Then on each interval [xi,xi+1],[x_{i}, x_{i+1}]\text{,} the area of the rectangle formed is given by

Ai+1=f(xi)⋅Δx, A_{i+1} = f(x_i) \cdot \Delta x\text{,}

as seen in Figure 4.2.44.2.4.

4_2_LeftSum.svg

Figure 4.2.44.2.4. Subdividing the interval [a,b][a,b] into nn subintervals of equal length Δx\Delta x and approximating the area under y=f(x)y = f(x) over [a,b][a,b] using left rectangles.

If we let LnL_n denote the sum of the areas of these rectangles, we see that

Ln=(A1+A2+⋯+Ai+1+⋯+An=(f(x0)⋅Δx+f(x1)⋅Δx+⋯+f(xi)⋅Δx+⋯+f(xn−1)⋅Δx.\begin{align*} L_n =\mathstrut & A_1 + A_2 + \cdots + A_{i+1} + \cdots + A_n\\[4pt] =\mathstrut & f(x_0) \cdot \Delta x + f(x_1) \cdot \Delta x + \cdots + f(x_i) \cdot \Delta x + \cdots + f(x_{n-1}) \cdot \Delta x\text{.} \end{align*}

In the more compact sigma notation, we have

Ln=∑i=0n−1f(xi)Δx. L_n = \sum_{i = 0}^{n-1} f(x_i) \Delta x\text{.}

Note that since the index of summation begins at 00 and ends at n−1,n-1\text{,} there are indeed nn terms in this sum. We call LnL_n the left Riemann sum for the function ff on the interval [a,b].[a,b]\text{.}

To see how the Riemann sums for right endpoints and midpoints are constructed, we consider Figure 4.2.54.2.5.

4_2_RightMidSum.svg

Figure 4.2.54.2.5. Riemann sums using right endpoints and midpoints.

For the sum with right endpoints, we see that the area of the rectangle on an arbitrary interval [xi,xi+1][x_i, x_{i+1}] is given by Bi+1=f(xi+1)⋅Δx,B_{i+1} = f(x_{i+1}) \cdot \Delta x\text{,} and that the sum of all such areas of rectangles is given by

Rn=(B1+B2+⋯+Bi+1+⋯+Bn=(f(x1)⋅Δx+f(x2)⋅Δx+⋯+f(xi+1)⋅Δx+⋯+f(xn)⋅Δx=(∑i=1nf(xi)Δx.\begin{align*} R_n =\mathstrut & B_1 + B_2 + \cdots + B_{i+1} + \cdots + B_n\\[4pt] =\mathstrut & f(x_1) \cdot \Delta x + f(x_2) \cdot \Delta x + \cdots + f(x_{i+1}) \cdot \Delta x + \cdots + f(x_{n}) \cdot \Delta x\\[4pt] =\mathstrut & \sum_{i=1}^{n} f(x_i) \Delta x\text{.} \end{align*}

We call RnR_n the right Riemann sum for the function ff on the interval [a,b].[a,b]\text{.}

For the sum that uses midpoints, we introduce the notation

x‾i+1=xi+xi+12 \overline{x}_{i+1} = \frac{x_{i} + x_{i+1}}{2}

so that x‾i+1\overline{x}_{i+1} is the midpoint of the interval [xi,xi+1].[x_i, x_{i+1}]\text{.} For instance, for the rectangle with area C1C_1 in Figure 4.2.14.2.15, we now have

C1=f(x‾1)⋅Δx. C_1 = f(\overline{x}_1) \cdot \Delta x\text{.}

Hence, the sum of all the areas of rectangles that use midpoints is

Mn=(C1+C2+⋯+Ci+1+⋯+Cn=(f(x1‾)⋅Δx+f(x2‾)⋅Δx+⋯+f(x‾i+1)⋅Δx+⋯+f(x‾n)⋅Δx=(∑i=1nf(x‾i)Δx,\begin{align*} M_n =\mathstrut & C_1 + C_2 + \cdots + C_{i+1} + \cdots + C_n\\[4pt] =\mathstrut & f(\overline{x_1}) \cdot \Delta x + f(\overline{x_2}) \cdot \Delta x + \cdots + f(\overline{x}_{i+1}) \cdot \Delta x + \cdots + f(\overline{x}_{n}) \cdot \Delta x\\[4pt] =\mathstrut & \sum_{i=1}^{n} f(\overline{x}_i) \Delta x\text{,} \end{align*}

and we say that MnM_n is the middle Riemann sum for ff on [a,b].[a,b]\text{.}

Thus, we have two variables to explore: the number of rectangles and the height of each rectangle. We can explore these choices dynamically, and the applet 1  found at http://gvsu.edu/s/a9 is a particularly useful one. There we see the image shown in Figure 4.2.64.2.6, but with the opportunity to adjust the slider bars for the heights and the number of rectangles.

Marc Renault, Geogebra Calculus Applets.
 

 4_2_RenaultAppletRS.svg

Figure 4.2.64.2.6. A snapshot of the applet found at http://gvsu.edu/s/a9.

By moving the sliders, we can see how the heights of the rectangles change as we consider left endpoints, midpoints, and right endpoints, as well as the impact that a larger number of narrower rectangles has on the approximation of the exact area bounded by the function and the horizontal axis.

When f(x)≥0f(x) \ge 0 on [a,b],[a,b]\text{,} each of the Riemann sums Ln,L_n\text{,} Rn,R_n\text{,} and MnM_n provides an estimate of the area under the curve y=f(x)y = f(x) over the interval [a,b].[a,b]\text{.} We also recall that in the context of a nonnegative velocity function y=v(t),y = v(t)\text{,} the corresponding Riemann sums approximate the distance traveled on [a,b][a,b] by a moving object with velocity function v.v\text{.}

There is a more general way to think of Riemann sums, and that is to allow any choice of where the function is evaluated to determine the rectangle heights. Rather than saying we'll always choose left endpoints, or always choose midpoints, we simply say that a point xi+1∗x_{i+1}^* will be selected at random in the interval [xi,xi+1][x_i, x_{i+1}] (so that xi≤xi+1∗≤xi+1x_i \le x_{i+1}^* \le x_{i+1}). The Riemann sum is then given by

f(x1∗)⋅Δx+f(x2∗)⋅Δx+⋯+f(xi+1∗)⋅Δx+⋯+f(xn∗)⋅Δx=∑i=1nf(xi∗)Δx. f(x_1^*) \cdot \Delta x + f(x_2^*) \cdot \Delta x + \cdots + f(x_{i+1}^*) \cdot \Delta x + \cdots + f(x_n^*) \cdot \Delta x = \sum_{i=1}^{n} f(x_i^*) \Delta x\text{.}

At http://gvsu.edu/s/a9, the applet noted earlier and referenced in Figure 4.2.64.2.6, by unchecking the “relative” box at the top left, and instead checking “random,” we can easily explore the effect of using random point locations in subintervals on a Riemann sum. In computational practice, we most often use Ln,L_n\text{,} Rn,R_n\text{,} or Mn,M_n\text{,} while the random Riemann sum is useful in theoretical discussions. In the following activity, we investigate several different Riemann sums for a particular velocity function.

Activity 4.2.34.2.3

Suppose that an object moving along a straight line path has its velocity in feet per second at time tt in seconds given by v(t)=29(t−3)2+2.v(t) = \frac{2}{9}(t-3)^2 + 2\text{.}

  1. Carefully sketch the region whose exact area will tell you the value of the distance the object traveled on the time interval 2≤t≤5.2 \le t \le 5\text{.}
  2. Estimate the distance traveled on [2,5][2,5] by computing L4,L_4\text{,} R4,R_4\text{,} and M4.M_4\text{.}
  3. Does averaging L4L_4 and R4R_4 result in the same value as M4?M_4\text{?} If not, what do you think the average of L4L_4 and R4R_4 measures?
  4. For this question, think about an arbitrary function f,f\text{,} rather than the particular function vv given above. If ff is positive and increasing on [a,b],[a,b]\text{,} will LnL_n over-estimate or under-estimate the exact area under ff on [a,b]?[a,b]\text{?} Will RnR_n over- or under-estimate the exact area under ff on [a,b]?[a,b]\text{?} Explain.

When the function is sometimes negative

For a Riemann sum such as

Ln=∑i=0n−1f(xi)Δx, L_n = \sum_{i=0}^{n-1} f(x_i) \Delta x\text{,}

we can of course compute the sum even when ff takes on negative values. We know that when ff is positive on [a,b],[a,b]\text{,} a Riemann sum estimates the area bounded between ff and the horizontal axis over the interval.

4_2_NegF.svg

Figure 4.2.74.2.7. At left and center, two left Riemann sums for a function ff that is sometimes negative; at right, the areas bounded by ff on the interval [a,d].[a,d]\text{.}

For the function pictured in the first graph of Figure 4.2.74.2.7, a left Riemann sum with 12 subintervals over [a,d][a,d] is shown. The function is negative on the interval b≤x≤c,b \le x \le c\text{,} so at the four left endpoints that fall in [b,c],[b,c]\text{,} the terms f(xi)Δxf(x_i) \Delta x are negative. This means that those four terms in the Riemann sum produce an estimate of the opposite of the area bounded by y=f(x)y = f(x) and the xx-axis on [b,c].[b,c]\text{.}

In the middle graph of Figure 4.2.74.2.7, we see that by increasing the number of rectangles the approximation of the area (or the opposite of the area) bounded by the curve appears to improve.

In general, any Riemann sum of a continuous function ff on an interval [a,b][a,b] approximates the difference between the area that lies above the horizontal axis on [a,b][a,b] and under ff and the area that lies below the horizontal axis on [a,b][a,b] and above f.f\text{.} In the notation of Figure 4.2.74.2.7, we may say that

L24≈A1−A2+A3, L_{24} \approx A_1 - A_2 + A_3\text{,}

where L24L_{24} is the left Riemann sum using 24 subintervals shown in the middle graph. A1A_1 and A3A_3 are the areas of the regions where ff is positive, and A2A_2 is the area where ff is negative. We will call the quantity A1−A2+A3A_1 - A_2 + A_3 the net signed area bounded by ff over the interval [a,d],[a,d]\text{,} where by the phrase “signed area” we indicate that we are attaching a minus sign to the areas of regions that fall below the horizontal axis.

Finally, we recall that if the function ff represents the velocity of a moving object, the sum of the areas bounded by the curve tells us the total distance traveled over the relevant time interval, while the net signed area bounded by the curve computes the object's change in position on the interval.

Activity 4.2.44.2.4

Suppose that an object moving along a straight line path has its velocity vv (in feet per second) at time tt (in seconds) given by

v(t)=12t2−3t+72. v(t) = \frac{1}{2}t^2 - 3t + \frac{7}{2}\text{.}
  1. Compute M5,M_5\text{,} the middle Riemann sum, for vv on the time interval [1,5].[1,5]\text{.} Be sure to clearly identify the value of Δt\Delta t as well as the locations of t0,t_0\text{,} t1,t_1\text{,} ⋯,\cdots\text{,} t5.t_5\text{.} In addition, provide a careful sketch of the function and the corresponding rectangles that are being used in the sum.
  2. Building on your work in (a), estimate the total change in position of the object on the interval [1,5].[1,5]\text{.}
  3. Building on your work in (a) and (b), estimate the total distance traveled by the object on [1,5].[1,5]\text{.}
  4. Use appropriate computing technology 2  to compute M10M_{10} and M20.M_{20}\text{.} What exact value do you think the middle sum eventually approaches as nn increases without bound? What does that number represent in the physical context of the overall problem?

For instance, consider the applet at http://gvsu.edu/s/a9 and change the function and adjust the locations of the blue points that represent the interval endpoints aa and b.b\text{.}

Summary

  • A Riemann sum is simply a sum of products of the form f(xi∗)Δxf(x_i^*) \Delta x that estimates the area between a positive function and the horizontal axis over a given interval. If the function is sometimes negative on the interval, the Riemann sum estimates the difference between the areas that lie above the horizontal axis and those that lie below the axis.
  • The three most common types of Riemann sums are left, right, and middle sums, but we can also work with a more general Riemann sum. The only difference among these sums is the location of the point at which the function is evaluated to determine the height of the rectangle whose area is being computed. For a left Riemann sum, we evaluate the function at the left endpoint of each subinterval, while for right and middle sums, we use right endpoints and midpoints, respectively.
  • The left, right, and middle Riemann sums are denoted Ln,L_n\text{,} Rn,R_n\text{,} and Mn,M_n\text{,} with formulas
    Ln=f(x0)Δx+f(x1)Δx+⋯+f(xn−1)Δx=∑i=0n−1f(xi)Δx,Rn=f(x1)Δx+f(x2)Δx+⋯+f(xn)Δx=∑i=1nf(xi)Δx,Mn=f(x‾1)Δx+f(x‾2)Δx+⋯+f(x‾n)Δx=∑i=1nf(x‾i)Δx,\begin{align*} L_n = f(x_0) \Delta x + f(x_1) \Delta x + \cdots + f(x_{n-1}) \Delta x &= \sum_{i = 0}^{n-1} f(x_i) \Delta x,\\[4pt] R_n = f(x_1) \Delta x + f(x_2) \Delta x + \cdots + f(x_{n}) \Delta x &= \sum_{i = 1}^{n} f(x_i) \Delta x,\\[4pt] M_n = f(\overline{x}_1) \Delta x + f(\overline{x}_2) \Delta x + \cdots + f(\overline{x}_{n}) \Delta x &= \sum_{i = 1}^{n} f(\overline{x}_i) \Delta x\text{,} \end{align*}

    where x0=a,x_0 = a\text{,} xi=a+iΔx,x_i = a + i\Delta x\text{,} and xn=b,x_n = b\text{,} using Δx=b−an.\Delta x = \frac{b-a}{n}\text{.} For the midpoint sum, x‾i=(xi−1+xi)/2.\overline{x}_{i} = (x_{i-1} + x_i)/2\text{.}

Credit and licence

This page titled 4.2: Riemann Sums was last modified on Thu, 28 Sep 2023 17:04:12 GMT and is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Matthew Boelkins, David Austin, and Steven Schlicker ( ScholarWorks @Grand Valley State University ) via source content that was edited to the style and standards of the LibreTexts platform.

Source: https://math.libretexts.org/Bookshelves/Calculus/Active_Calculus_(Boelkins_et_al.)/04%3A_The_Definite_Integral/4.02%3A_Riemann_Sums

Licence: CC BY-SA 4.0 (creativecommons.org/licenses/by-sa/4.0/). You may share and adapt it under the same licence, with this credit. WorldClass adapted the formatting only: the text is the authors', with interactive parts and links to other sites left out.

Build status · Flash Infinity AI™ is a trademark of AI-Flash Inc.. WorldClass is not affiliated with, approved or accredited by any exam board, curriculum provider or university unless a page says so.