# 5.3 Riemann Sums

In the previous section we defined the definite integral of a function on $[a,b]$ to be the signed area between the curve and the $x$-axis. Some areas were simple to compute; we ended the section with a region whose area was not simple to compute. In this section we develop a technique to find such areas.

A fundamental calculus technique is to first answer a given problem with an approximation, then refine that approximation to make it better, then use limits in the refining process to find the exact answer. That is exactly what we will do here.

Consider the region given in Figure 5.3.1, which is the area under $y=4x-x^{2}$ on $[0,4]$. What is the signed area of this region — i.e., what is $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$?

margin: Figure 5.3.1: A graph of $f(x)=4x-x^{2}$. What is the area of the shaded region? Λ

We start by approximating. We can surround the region with a rectangle with height and width of 4 and find the area is approximately 16 square units. This is obviously an over-approximation; we are including area in the rectangle that is not under the parabola.

We have an approximation of the area, using one rectangle. How can we refine our approximation to make it better? The key to this section is this answer: use more rectangles.

Let’s use 4 rectangles of equal width of 1. This partitions the interval $[0,4]$ into 4 subintervals, $[0,1]$, $[1,2]$, $[2,3]$ and $[3,4]$. On each subinterval we will draw a rectangle.

There are three common ways to determine the height of these rectangles: the Left Hand Rule, the Right Hand Rule, and the Midpoint Rule. The Left Hand Rule says to evaluate the function at the left-hand endpoint of the subinterval and make the rectangle that height. In Figure 5.3.2, the rectangle drawn on the interval $[2,3]$ has height determined by the Left Hand Rule; it has a height of $f(2)$. (The rectangle is labeled “LHR.”)

margin: Figure 5.3.2: Approximating $\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ using rectangles. The heights of the rectangles are determined using different rules. Λ

The Right Hand Rule says the opposite: on each subinterval, evaluate the function at the right endpoint and make the rectangle that height. In the figure, the rectangle drawn on $[0,1]$ is drawn using $f(1)$ as its height; this rectangle is labeled “RHR.”.

The Midpoint Rule says that on each subinterval, evaluate the function at the midpoint and make the rectangle that height. The rectangle drawn on $[1,2]$ was made using the Midpoint Rule, with a height of $f(1.5)$. That rectangle is labeled “MPR.”

These are the three most common rules for determining the heights of approximating rectangles, but one is not forced to use one of these three methods. The rectangle on $[3,4]$ has a height of approximately $f(3.53)$, very close to the Midpoint Rule. It was chosen so that the area of the rectangle is exactly the area of the region under $f$ on $[3,4]$. (Later you’ll be able to figure how to do this, too.)

The following example will approximate the value of $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ using these rules.

###### Example 5.3.1 Using the Left Hand, Right Hand and Midpoint Rules

Approximate the value of $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ using the Left Hand Rule, the Right Hand Rule, and the Midpoint Rule, using 4 equally spaced subintervals.

SolutionWe break the interval $[0,4]$ into four subintervals as before. In Figure 5.3.3 we first see 4 rectangles drawn on $f(x)=4x-x^{2}$ using the Left Hand Rule. (The areas of the rectangles are given in each figure.)

margin: Left Hand Rule Right Hand Rule Midpoint Rule Figure 5.3.3: Approximating $\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ in Example 5.3.1. Λ

Note how in the first subinterval, $[0,1]$, the rectangle has height $f(0)=0$. We add up the areas of each rectangle (height$\times$ width) for our Left Hand Rule approximation:

 $\displaystyle f(0)\cdot 1+f(1)\cdot 1+f(2)\cdot 1+f(3)\cdot 1$ $\displaystyle=$ $\displaystyle 0+3+4+3$ $\displaystyle=10.$

Figure 5.3.3 next shows 4 rectangles drawn under $f$ using the Right Hand Rule; note how the $[3,4]$ subinterval has a rectangle of height 0.

These rectangle seem to be the mirror image of those found with the Left Hand Rule. (This is because of the symmetry of our shaded region.) Our approximation gives the same answer as before, though calculated a different way:

 $\displaystyle f(1)\cdot 1+f(2)\cdot 1+f(3)\cdot 1+f(4)\cdot 1$ $\displaystyle=$ $\displaystyle 3+4+3+0$ $\displaystyle=10.$

Figure 5.3.3 last shows 4 rectangles drawn under $f$ using the Midpoint Rule. This gives an approximation of $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ as:

 $\displaystyle f(0.5)\cdot 1+f(1.5)\cdot 1+f(2.5)\cdot 1+f(3.5)\cdot 1$ $\displaystyle=$ $\displaystyle 1.75+3.75+3.75+1.75$ $\displaystyle=11.$

Our three methods provide two approximations of $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$: 10 and 11.

## Summation Notation

It is hard to tell at this moment which is a better approximation: 10 or 11? We can continue to refine our approximation by using more rectangles. The notation can become unwieldy, though, as we add up longer and longer lists of numbers. We introduce summation notation to ameliorate this problem.

Suppose we wish to add up a list of numbers $a_{1}$, $a_{2}$, $a_{3}$, …, $a_{9}$. Instead of writing

 $a_{1}+a_{2}+a_{3}+a_{4}+a_{5}+a_{6}+a_{7}+a_{8}+a_{9},$

we use summation notation and write

 $\sum_{i=1}^{9}a_{i}$

Lets analyze this notation.
Figure 5.3.4: Understanding summation notation.

The upper case sigma, $\sum$, represents the term “sum.” The index of summation in this example is $i$; any symbol can be used. By convention, the index takes on only the integer values between (and including) the lower and upper bounds.

Let’s practice using this notation.

###### Example 5.3.2 Using summation notation

Let the numbers $\{a_{i}\}$ be defined as $a_{i}=2i-1$ for integers $i$, where $i\geq 1$. So $a_{1}=1$, $a_{2}=3$, $a_{3}=5$, etc. (The output is the positive odd integers). Evaluate the following summations:

 $1.\ \sum_{i=1}^{6}a_{i}\qquad\qquad\qquad 2.\ \sum_{i=3}^{7}(3a_{i}-4)\qquad% \qquad\qquad 3.\ \sum_{i=1}^{4}(a_{i})^{2}$

Solution

1. (a)

\begin{aligned} \sum_{i=1}^{6}a_{i}&=a_{1}+a_{2}+a_{3}+a_{4}+a_{5}+a_{6}\\ &=1+3+5+7+9+11\\ &=36.\end{aligned}

2. (b)

Note the starting value is different than 1:

 $\displaystyle\sum_{i=3}^{7}$ $\displaystyle(3a_{i}-4)$ $\displaystyle=(3a_{3}-4)+(3a_{4}-4)+(3a_{5}-4)+(3a_{6}-4)+(3a_{7}-4)$ $\displaystyle=11+17+23+29+35$ $\displaystyle=115.$
3. (c)

\begin{aligned} \sum_{i=1}^{4}(a_{i})^{2}&=(a_{1})^{2}+(a_{2})^{2}+(a_{3})^{2}% +(a_{4})^{2}\\ &=1^{2}+3^{2}+5^{2}+7^{2}\\ &=84\end{aligned}

It might seem odd to stress a new, concise way of writing summations only to write each term out as we add them up. It is. The following theorem gives some of the properties of summations that allow us to work with them without writing individual terms. Examples will follow.

###### Theorem 5.3.1 Properties of Summations

(a) $\displaystyle\sum_{i=1}^{n}c=c\cdot n$, where $c$ is a constant. (b) $\displaystyle\sum_{i=m}^{n}(a_{i}\pm b_{i})=\sum_{i=m}^{n}a_{i}\pm\sum_{i=m}^{% n}b_{i}$ (c) $\displaystyle\sum_{i=m}^{n}c\cdot a_{i}=c\cdot\sum_{i=m}^{n}a_{i}$ (d) $\displaystyle\sum_{i=m}^{j}a_{i}+\sum_{i=j+1}^{n}a_{i}=\sum_{i=m}^{n}a_{i}$ (e) $\displaystyle\sum_{i=1}^{n}i=\frac{n(n+1)}{2}$ (f) $\displaystyle\sum_{i=1}^{n}i^{2}=\frac{n(n+1)(2n+1)}{6}$ (g) $\displaystyle\sum_{i=1}^{n}i^{3}=\left(\frac{n(n+1)}{2}\right)^{2}$

Note: In practice we will sometimes need variations on formulas 5, 6, and 7 above. For example, we note that

 $\sum_{i=0}^{n}i=0+1+2+\dots+n=0+\sum_{i=1}^{n}i=0+\frac{n(n+1)}{2}=\frac{n(n+1% )}{2}\text{,}$

so we see that

 $\sum_{i=0}^{n}i=\frac{n(n+1)}{2}.$

Similarly, we find that

 $\displaystyle\sum_{i=0}^{n}i^{2}$ $\displaystyle=\frac{n(n+1)(2n+1)}{6},\quad\text{and}$ $\displaystyle\sum_{i=0}^{n}i^{3}$ $\displaystyle=\left(\frac{n(n+1)}{2}\right)^{2}$
###### Example 5.3.3 Evaluating summations using Theorem 5.3.1

Revisit Example 5.3.2 and, using Theorem 5.3.1, evaluate

 $\sum_{i=1}^{6}a_{i}=\sum_{i=1}^{6}(2i-1).$

Solution

 $\displaystyle\sum_{i=1}^{6}(2i-1)$ $\displaystyle=\sum_{i=1}^{6}2i-\sum_{i=1}^{6}(1)$ (Theorem 5.3.1(2)) $\displaystyle=\left(2\sum_{i=1}^{6}i\right)-\sum_{i=1}^{6}(1)$ (Theorem 5.3.1(3)) $\displaystyle=2\left(\frac{6(6+1)}{2}\right)-6$ (Theorem 5.3.1(1,5)) $\displaystyle=2(21)-6=36$

We obtained the same answer without writing out all six terms. When dealing with small sizes of $n$, it may be faster to write the terms out by hand. However, Theorem 5.3.1 is incredibly important when dealing with large sums as we’ll soon see.

## Riemann Sums

Consider again $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$. We will approximate this definite integral using 16 equally spaced subintervals and the Right Hand Rule in Example 5.3.4. Before doing so, it will pay to do some careful preparation.

margin: Figure 5.3.5: Dividing $[0,4]$ into 16 equally spaced subintervals. Λ

Figure 5.3.5 shows a number line of $[0,4]$ subdivided into 16 equally spaced subintervals. We denote $0$ as $x_{0}$; we have marked the values of $x_{4}$, $x_{8}$, $x_{12}$, and $x_{16}$. We could mark them all, but the figure would get crowded. While it is easy to figure that $x_{9}=2.25$, in general, we want a method of determining the value of $x_{i}$ without consulting the figure. Consider:

So $x_{9}=x_{0}+9(4/16)=9/4=2.25$.

If we had partitioned $[0,4]$ into 100 equally spaced subintervals, each subinterval would have length $\Delta x=4/100=0.04$. We could compute $x_{31}$ as

 $x_{31}=x_{0}+31(4/100)=124/100=1.24.$

(That was far faster than creating a sketch first.)

Given any subdivision of $[0,4]$, the first subinterval is $[x_{0},x_{1}]$; the second is $[x_{1},x_{2}]$; the $i^{th}$ subinterval is $[x_{i-1},x_{i}]$.

When using the Left Hand Rule, the height of the $i^{th}$ rectangle will be $f(x_{i-1})$.

When using the Right Hand Rule, the height of the $i^{th}$ rectangle will be $f(x_{i})$.

When using the Midpoint Rule, the height of the $i^{th}$ rectangle will be $f\left(\frac{x_{i-1}+x_{i}}{2}\right)$.

Thus approximating $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ with 16 equally spaced subintervals can be expressed as follows, where $\Delta x=4/16=1/4$:
Left Hand Rule: $\displaystyle\sum_{i=1}^{16}f(x_{i-1})\Delta x$
Right Hand Rule: $\displaystyle\sum_{i=1}^{16}f(x_{i})\Delta x$
Midpoint Rule: $\displaystyle\sum_{i=1}^{16}f\left(\frac{x_{i-1}+x_{i}}{2}\right)\Delta x$

We use these formulas in the next two examples. The following example lets us practice using the Left Hand Rule and the summation formulas introduced in Theorem 5.3.1.

###### Example 5.3.4 Approximating definite integrals using sums

Approximate $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ using the Right Hand Rule and summation formulas with 16 and 1000 equally spaced intervals.

SolutionUsing the formula derived before, using 16 equally spaced intervals and the Right Hand Rule, we can approximate the definite integral as

 $\sum_{i=1}^{16}f(x_{i})\Delta x.$

We have $\Delta x=4/16=0.25$, $x_{i}=0+i\Delta x=i\Delta x$, and $f(x_{i})=f(i\Delta x)=4i\Delta x-i^{2}\Delta x^{2}$. Using the summation formulas, we see:

 $\displaystyle\int_{0}^{4}$ $\displaystyle(4x-x^{2})\operatorname{d}\!x$ $\displaystyle\approx\sum_{i=1}^{16}f(x_{i})\Delta x$ $\displaystyle=\sum_{i=1}^{16}f(i\Delta x)\Delta x$ $\displaystyle=\sum_{i=1}^{16}(4i\Delta x-i^{2}(\Delta x)^{2})\Delta x$ (from above) $\displaystyle=\sum_{i=1}^{16}(4i(\Delta x)^{2}-i^{2}(\Delta x)^{3})$ $\displaystyle=\sum_{i=1}^{16}4i(\Delta x)^{2}-\sum_{i=1}^{16}i^{2}(\Delta x)^{3}$ (Theorem 5.3.1(2)) $\displaystyle=4(\Delta x)^{2}\sum_{i=1}^{16}i-(\Delta x)^{3}\sum_{i=1}^{16}i^{2}$ (*) (Theorem 5.3.1(3)) $\displaystyle=4\left(\frac{1}{4}\right)^{2}\left(\frac{(16)(17)}{2}\right)-% \left(\frac{1}{4}\right)^{3}\left(\frac{(16)(17)(33)}{6}\right)$ (Theorem 5.3.1(5,6)) $\displaystyle=34-\frac{187}{8}=\frac{85}{8}=10.625$
margin: Figure 5.3.6: Approximating $\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ with the Right Hand Rule and 16 evenly spaced subintervals. Λ

We were able to sum up the areas of 16 rectangles with very little computation. In Figure 5.3.6 the function and the 16 rectangles are graphed. While some rectangles over-approximate the area, others under-approximate the area by about the same amount. Thus our approximate area of 10.625 is likely a fairly good approximation.

Notice Equation (*); by changing the 16’s to 1000’s and changing the value of $\Delta x$ to $4/1000=0.004$, we can use the equation to sum up the areas of 1000 rectangles. We do so here, skipping from the original summand to the equivalent of Equation (*) to save space.

 $\displaystyle\int_{0}^{4}$ $\displaystyle(4x-x^{2})\operatorname{d}\!x$ $\displaystyle\approx\sum_{i=1}^{1000}f(x_{i})\Delta x$ $\displaystyle=4(\Delta x)^{2}\sum_{i=1}^{1000}i-(\Delta x)^{3}\sum_{i=1}^{1000% }i^{2}$ $\displaystyle=4(.004)^{2}\left(\frac{(1000)(1001)}{2}\right)-(0.004)^{3}\left(% \frac{(1000)(1001)(2001)}{6}\right)$ $\displaystyle=10.666656$

Using many, many rectangles, we likely have a good approximation:

 $\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x\approx 10.666656.$

Before the above example, we stated what the summations for the Left Hand, Right Hand and Midpoint Rules looked like. Each had the same basic structure, which was:

1. (a)

each rectangle has the same width, which we referred to as $\Delta x$, and

2. (b)

each rectangle’s height is determined by evaluating $f$ at a particular point in each subinterval. For instance, the Left Hand Rule states that each rectangle’s height is determined by evaluating $f$ at the left hand endpoint of the subinterval the rectangle lives on.

One could partition an interval $[a,b]$ with subintervals that did not have the same size. We refer to the length of the first subinterval as $\Delta x_{1}$, the length of the second subinterval as $\Delta x_{2}$, and so on, giving the length of the $i^{\text{ th}}$ subinterval as $\Delta x_{i}$. Also, one could determine each rectangle’s height by evaluating $f$ at any point in the $i^{\text{ th}}$ subinterval. We refer to the point picked in the first subinterval as $c_{1}$, the point picked in the second subinterval as $c_{2}$, and so on, with $c_{i}$ representing the point picked in the $i^{\text{ th}}$ subinterval. Thus the height of the $i^{\text{ th}}$ subinterval would be $f(c_{i})$, and the area of the $i^{\text{ th}}$ rectangle would be $f(c_{i})\Delta x_{i}$.

Summations of rectangles with area $f(c_{i})\Delta x_{i}$ are named after mathematician Georg Friedrich Bernhard Riemann, as given in the following definition.

###### Definition 5.3.1 Riemann Sum

Let $f$ be defined on the closed interval $[a,b]$ and let $P$ be a partition of $[a,b]$, with

 $a=x_{0}

Let $\Delta x_{i}$ denote the length of the $i^{\text{ th}}$ subinterval $[x_{i-1},x_{i}]$ and let $c_{i}$ denote any value in the $i^{\text{ th}}$ subinterval. The sum

 $\sum_{i=1}^{n}f(c_{i})\Delta x_{i}$

is a Riemann sum of $f$ on $[a,b]$.

margin: Figure 5.3.7: An example of a general Riemann sum to approximate $\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$. Λ

In Figure 5.3.7, we see the approximating rectangles of a Riemann sum of $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$. While the rectangles in this example do not approximate well the shaded area, they demonstrate that the subinterval widths may vary and the heights of the rectangles can be determined without following a particular rule.

Usually, Riemann sums are calculated using one of the three methods we have introduced. The uniformity of construction makes computations easier. We have $\Delta x_{i}=\Delta x=\dfrac{b-a}{n}$ and the $i^{\text{ th}}$ term of the partition is $x_{i}=a+i\Delta x$. Then the Left Hand Rule uses $c_{i}=x_{i-1}$, the Right Hand Rule uses $c_{i}=x_{i}$, and the Midpoint Rule uses $c_{i}=\dfrac{x_{i-1}+x_{i}}{2}$.

Let’s do another example.

###### Example 5.3.5 Approximating definite integrals with sums

Approximate $\displaystyle\int_{-2}^{3}(5x+2)\operatorname{d}\!x$ using the Midpoint Rule and 10 equally spaced intervals.

SolutionWe see that

 $\Delta x=\frac{3-(-2)}{10}=\frac{1}{2}\quad\text{and}\quad x_{i}=(-2)+\frac{1}% {2}i=\frac{i}{2}-2.$

As we are using the Midpoint Rule, we will also need $x_{i-1}$ and $\displaystyle\frac{x_{i-1}+x_{i}}{2}$. Since $x_{i}=\frac{i}{2}-\frac{5}{2}$, $x_{i-1}=\frac{i-1}{2}-2=\frac{i}{2}-\frac{5}{2}$. This gives

 $\frac{x_{i-1}+x_{i}}{2}=\frac{(\frac{i}{2}-\frac{5}{2})+(\frac{i}{2}-2)}{2}=% \frac{i-\frac{9}{2}}{2}=\frac{i}{2}-\frac{9}{4}.$

We now construct the Riemann sum and compute its value using summation formulas.

 $\displaystyle\int_{-2}^{3}(5x+2)\operatorname{d}\!x$ $\displaystyle\approx\sum_{i=1}^{10}f\left(\frac{x_{i-1}+x_{i}}{2}\right)\Delta x$ $\displaystyle=\sum_{i=1}^{10}f\left(\frac{i}{2}-\frac{9}{4}\right)\Delta x$ $\displaystyle=\sum_{i=1}^{10}\left(5\left(\frac{i}{2}-\frac{9}{4}\right)+2% \right)\left(\frac{1}{2}\right)$ $\displaystyle=\sum_{i=1}^{10}\left(\frac{5i}{4}-\frac{37}{8}\right)$ $\displaystyle=\left(\frac{5}{4}\sum_{i=1}^{10}(i)-\sum_{i=1}^{10}\left(\frac{3% 7}{8}\right)\right)$ $\displaystyle=\left(\frac{5}{4}\cdot\frac{(10)(11)}{2}-10\cdot\frac{37}{8}\right)$ $\displaystyle=\frac{45}{2}=22.5$
margin: Figure 5.3.8: Approximating $\int_{-2}^{3}(5x+2)\operatorname{d}\!x$ using the Midpoint Rule and 10 evenly spaced subintervals in Example 5.3.5. Λ

Note the graph of $f(x)=5x+2$ in Figure 5.3.8. The regions whose area is computed by the definite integral are triangles, meaning we can find the exact answer without summation techniques. We find that the exact answer is indeed 22.5. One of the strengths of the Midpoint Rule is that often each rectangle includes area that should not be counted, but misses other area that should. When $\Delta x$ is small, these two amounts are about equal and these errors almost “subtract each other out.” In this example, since our function is a line, these errors are exactly equal and they do subtract each other out, giving us the exact answer.

Note too that when the function is negative, the rectangles have a “negative” height. When we compute the area of the rectangle, we use $f(c_{i})\Delta x$; when $f$ is negative, the area is counted as negative.

Notice in the previous example that while we used 10 equally spaced intervals, the number “10” didn’t play a big role in the calculations until the very end. Mathematicians love to abstract ideas; let’s approximate the area of another region using $n$ subintervals, where we do not specify a value of $n$ until the very end.

###### Example 5.3.6 Approximating definite integrals with a sum formula

Revisit $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ yet again. Approximate this definite integral using the Right Hand Rule with $n$ equally spaced subintervals.

SolutionWe see that $\Delta x=\dfrac{4-0}{n}=\dfrac{4}{n}$. We also find $x_{i}=0+\Delta xi=\dfrac{4i}{n}$.

We construct the Right Hand Rule Riemann sum as follows. Be sure to follow each step carefully. If you get stuck, and do not understand how one line proceeds to the next, you may skip to the result and consider how this result is used. You should come back, though, and work through each step for full understanding.

 $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ $\displaystyle\approx\sum_{i=1}^{n}f(x_{i})\Delta x$ $\displaystyle=\sum_{i=1}^{n}f\left(\frac{4i}{n}\right)\Delta x$ $\displaystyle=\sum_{i=1}^{n}\left[4\frac{4i}{n}-\left(\frac{4i}{n}\right)^{2}% \right]\frac{4}{n}$ $\displaystyle=\sum_{i=1}^{n}\left(\frac{64}{n^{2}}\right)i-\sum_{i=1}^{n}\left% (\frac{64}{n^{3}}\right)i^{2}$ $\displaystyle=\left(\frac{64}{n^{2}}\right)\sum_{i=1}^{n}i-\left(\frac{64}{n^{% 3}}\right)\sum_{i=1}^{n}i^{2}$ $\displaystyle=\left(\frac{64}{n^{2}}\right)\cdot\frac{n(n+1)}{2}-\left(\frac{6% 4}{n^{3}}\right)\frac{n(n+1)(2n+1)}{6}$ $\displaystyle=\frac{32(n+1)}{n}-\frac{32(n+1)(2n+1)}{3n^{2}}\qquad\text{\small% (now simplify)}$ $\displaystyle=\frac{32}{3}\left(1-\frac{1}{n^{2}}\right)$

The result is an amazing, easy to use formula. To approximate the definite integral with 10 equally spaced subintervals and the Right Hand Rule, set $n=10$ and compute

 $\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x\approx\frac{32}{3}\left(1-\frac{1}{1% 0^{2}}\right)=10.56.$

Recall how earlier we approximated the definite integral with 4 subintervals; with $n=4$, the formula gives 10, our answer as before.

It is now easy to approximate the integral with 1,000,000 subintervals. Hand-held calculators may round off the answer a bit prematurely giving an answer of $10\frac{2}{3}$. (The actual answer for this many subintervals is $10.666666666656$.)

We now take an important leap. Up to this point, our mathematics has been limited to geometry and algebra (finding areas and manipulating expressions). Now we apply calculus. For any finite $n$, we know that

 $\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x\approx\frac{32}{3}\left(1-\frac{1}{n% ^{2}}\right).$

Both common sense and high-level mathematics tell us that as $n$ gets large, the approximation gets better. In fact, if we take the limit as $n\rightarrow\infty$, we get the exact area described by $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$. That is,

 $\displaystyle\int_{0}^{4}(4x-x^{2})\operatorname{d}\!x$ $\displaystyle=\lim_{n\to\infty}\frac{32}{3}\left(1-\frac{1}{n^{2}}\right)$ $\displaystyle=\frac{32}{3}\left(1-0\right)$ $\displaystyle=\frac{32}{3}=10.\overline{6}$

This is a fantastic result. By considering $n$ equally-spaced subintervals, we obtained a formula for an approximation of the definite integral that involved our variable $n$. As $n$ grows large — without bound — the error shrinks to zero and we obtain the exact area.

This section started with a fundamental calculus technique: make an approximation, refine the approximation to make it better, then use limits in the refining process to get an exact answer. That is precisely what we just did.

Let’s practice this again.

###### Example 5.3.7 Approximating definite integrals with a sum formula

Find a formula that approximates $\displaystyle\int_{-1}^{5}x^{3}\operatorname{d}\!x$ using the Right Hand Rule and $n$ equally spaced subintervals, then take the limit as $n\to\infty$ to find the exact area.

SolutionWe see that $\Delta x=\frac{5-(-1)}{n}=\frac{6}{n}$ and $x_{i}=(-1)+i\Delta x=-1+\frac{6i}{n}$.

The Riemann sum corresponding to the Right Hand Rule is (followed by simplifications):

 $\displaystyle\int_{-1}^{5}x^{3}\operatorname{d}\!x$ $\displaystyle\approx\sum_{i=1}^{n}f(x_{i})\Delta x$ $\displaystyle=\sum_{i=1}^{n}f(-1+i\Delta x)\Delta x$ $\displaystyle=\sum_{i=1}^{n}\left(-1+i\frac{6}{n}\right)^{3}\frac{6}{n}$ $\displaystyle=\sum_{i=1}^{n}\frac{1296i^{3}}{n^{4}}-\frac{648i^{2}}{n^{3}}+% \frac{108i}{n^{2}}-\frac{6}{n}$ $\displaystyle=\frac{1296}{n^{4}}\sum_{i=1}^{n}i^{3}-\frac{648}{n^{3}}\sum_{i=1% }^{n}i^{2}+\frac{108}{n^{2}}\sum_{i=1}^{n}i-\sum_{i=1}^{n}\frac{6}{n}$ $\displaystyle=\frac{1296}{n^{4}}\left(\frac{n(n+1)}{2}\right)^{2}-\frac{648}{n% ^{3}}\frac{n(n+1)(2n+1)}{6}+\frac{108}{n^{2}}\frac{n(n+1)}{2}-6$ $\displaystyle=156+\frac{378}{n}+\frac{216}{n^{2}}\qquad\text{\small(after a % sizable amount of algebra)}$

Once again, we have found a compact formula for approximating the definite integral with $n$ equally spaced subintervals and the Right Hand Rule. Using 10 subintervals, we have an approximation of $195.96$ (these rectangles are shown in Figure 5.3.9). Using $n=100$ gives an approximation of $159.802$.

margin: Figure 5.3.9: Approximating $\displaystyle\int_{-1}^{5}x^{3}\operatorname{d}\!x$ using the Left Hand Rule and 10 evenly spaced subintervals. Λ

Now find the exact answer using a limit:

 $\int_{-1}^{5}x^{3}\operatorname{d}\!x=\lim_{n\to\infty}\left(156-\frac{378}{n}% +\frac{216}{n^{2}}\right)=156.$

## Limits of Riemann Sums

We have used limits to find the exact value of certain definite integrals. Will this always work? We will show, given not-very-restrictive conditions, that yes, it will always work.

The previous two examples demonstrated how an expression such as

 $\sum_{i=1}^{n}f(x_{i})\Delta x$

can be rewritten as an expression explicitly involving $n$, such as $\dfrac{32}{3}(1-\dfrac{1}{n^{2}})$.

Viewed in this manner, we can think of the summation as a function of $n$. An $n$ value is given (where $n$ is a positive integer), and the sum of areas of $n$ equally spaced rectangles is returned, using the Left Hand, Right Hand, or Midpoint Rules.

Given a definite integral $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$, let:

• $\displaystyle S_{L}(n)=\sum_{i=1}^{n}f(x_{i-1})\Delta x$, the sum of equally spaced rectangles formed using the Left Hand Rule,

• $\displaystyle S_{R}(n)=\sum_{i=1}^{n}f(x_{i})\Delta x$, the sum of equally spaced rectangles formed using the Right Hand Rule, and

• $\displaystyle S_{M}(n)=\sum_{i=1}^{n}f\left(\frac{x_{i-1}+x_{i}}{2}\right)\Delta x$, the sum of equally spaced rectangles formed using the Midpoint Rule.

Recall the definition of a limit as $n\to\infty$: $\displaystyle\lim_{n\to\infty}S_{L}(n)=K$ if, given any $\epsilon>0$, there exists $N>0$ such that

 $\left\lvert S_{L}(n)-K\right\rvert<\epsilon\quad\text{when}\quad n\geq N.$

The following theorem states that we can use any of our three rules to find the exact value of a definite integral $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$. It also goes two steps further. The theorem states that the height of each rectangle doesn’t have to be determined following a specific rule, but could be $f(c_{i})$, where $c_{i}$ is any point in the $i^{\text{ th}}$ subinterval, as discussed before Riemann Sums where defined in Definition 5.3.1.

The theorem goes on to state that the rectangles do not need to be of the same width. Using the notation of Definition 5.3.1, let $\Delta x_{i}$ denote the length of the $i^{\text{ th}}$ subinterval in a partition of $[a,b]$. Now let $\left\lVert P\right\rVert$ represent the length of the largest subinterval in the partition: that is, $\left\lVert P\right\rVert$ is the largest of all the $\Delta x_{i}$’s (this is sometimes called the size of the partition). If $\left\lVert P\right\rVert$ is small, then $[a,b]$ must be partitioned into many subintervals, since all subintervals must have small lengths. “Taking the limit as $\left\lVert P\right\rVert$ goes to zero” implies that the number $n$ of subintervals in the partition is growing to infinity, as the largest subinterval length is becoming arbitrarily small. We then interpret the expression

 $\lim_{\left\lVert P\right\rVert\to 0}\ \sum_{i=1}^{n}f(c_{i})\Delta x_{i}$

as “the limit of the sum of rectangles, where the width of each rectangle can be different but getting small, and the height of each rectangle is not necessarily determined by a particular rule.” The theorem states that this Riemann Sum also gives the value of the definite integral of $f$ over $[a,b]$.

###### Theorem 5.3.2 Definite Integrals and the Limit of Riemann Sums

Let $f$ be continuous on the closed interval $[a,b]$ and let $S_{L}(n)$, $S_{R}(n)$ and $S_{M}(n)$ be defined as before. Then:

1. (a)

$\displaystyle\lim_{n\to\infty}S_{L}(n)=\lim_{n\to\infty}S_{R}(n)=\lim_{n\to% \infty}S_{M}(n)=\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})\Delta x$,

2. (b)

$\displaystyle\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})\Delta x=\int_{a}^{b}f(x)% \operatorname{d}\!x$, and

3. (c)

$\displaystyle\lim_{\left\lVert P\right\rVert\to 0}\ \sum_{i=1}^{n}f(c_{i})% \Delta x_{i}=\int_{a}^{b}f(x)\operatorname{d}\!x$.

Now that we have more tools to work with, we can now justify the remaining properties in Theorem 5.2.1.

• Proof

1. (a)

To see why this property holds note that for any Riemann sum we have $\Delta x=0$, from which we see that:

 $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$ $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})\Delta x\quad\text{(by % \autoref{thm:riemannSum}(2))}$ $\displaystyle=\lim_{n\to\infty}0$ $\displaystyle=0$
2. (b)

Applying Theorem 5.3.2(2), we have:

 $\int_{a}^{b}f(x)\operatorname{d}\!x=\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})% \Delta x.$

When we compute $\displaystyle\int_{b}^{a}f(x)\operatorname{d}\!x$, we can use the same partitions and the same points $c_{i}$, so the heights $f(c_{i})$ will remain the same. Since we want to start at $x=b$ and finish at $x=a$, we use $\widetilde{\Delta}x=\frac{a-b}{n}=-\Delta x$. We now have:

 $\displaystyle\int_{b}^{a}f(x)\operatorname{d}\!x$ $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})\widetilde{\Delta}x$ (Theorem 5.3.2(2)) $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})(-\Delta x)$ $\displaystyle=\lim_{n\to\infty}-\left(\sum_{i=1}^{n}f(c_{i})\Delta x\right)$ (using Theorem 5.3.1(3)) $\displaystyle=-\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})\Delta x$ $\displaystyle=-\int_{a}^{b}f(x)\operatorname{d}\!x$ (Theorem 5.3.2(2))
3. (c)

This property was justified previously.

4. (d)

To see why this property holds, we again use Theorems 5.3.1 and 5.3.2. In this case we have:

 $\displaystyle\int_{a}^{b}(f(x)+g(x))\operatorname{d}\!x$ $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}(f(c_{i})+g(c_{i}))\Delta x$ $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}(f(c_{i})\Delta x+g(c_{i})\Delta x)$ $\displaystyle=\lim_{n\to\infty}\left(\sum_{i=1}^{n}f(c_{i})\Delta x+\sum_{i=0}% ^{n-1}g(c_{i})\Delta x\right)$ $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})\Delta x+\lim_{n\to\infty% }\sum_{i=1}^{n}g(c_{i})\Delta x$ $\displaystyle=\int_{a}^{b}f(x)\operatorname{d}\!x+\int_{a}^{b}g(x)% \operatorname{d}\!x$
5. (e)

The justification of this property is left as an exercise.∎

###### Theorem 5.3.3 Further Properties of the Definite Integral

Let $f$ be continuous on the interval $[a,b]$ and let $k$, $m$, and $M$ be constants. The following hold:

1. (a)

$\displaystyle\int_{a}^{b}k\operatorname{d}\!x=k(b-a)$.

2. (b)

If $m\leq f(x)$ for all $x$ in $[a,b]$, then $m(b-a)\leq\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$.

3. (c)

If $f(x)\leq M$ for all $x$ in $[a,b]$, then $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x\leq M(b-a)$.

• Proof

Before justifying these properties, note that for any subdivision of $[a,b]$ we have:

 $\sum_{i=1}^{n}\Delta x=n\frac{b-a}{n}=b-a.$

To see why (a) holds, let $k$ be a constant. We apply Theorem 5.3.2 to see that:

 $\displaystyle\int_{a}^{b}k\operatorname{d}\!x$ $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}k\Delta x$ $\displaystyle=\lim_{n\to\infty}k\left(\sum_{i=1}^{n}\Delta x\right)$ (using Theorem 5.3.1) $\displaystyle=k\left(\lim_{n\to\infty}\sum_{i=1}^{n}\Delta x\right)$ $\displaystyle=k\left(\lim_{n\to\infty}(b-a)\right)$ $\displaystyle=k(b-a)$

We can now use this property to see why (b) holds. Let $f$ and $m$ be as given. Then we have:

 $\displaystyle m(b-a)$ $\displaystyle=\int_{a}^{b}m\operatorname{d}\!x$ $\displaystyle=\lim_{n\to\infty}\sum_{i=1}^{n}m\Delta x$ $\displaystyle\leq\lim_{n\to\infty}\sum_{i=1}^{n}f(c_{i})\Delta x$ $\displaystyle=\int_{a}^{b}f(x)\operatorname{d}\!x$

Justifying property (c) is similar and is left as an exercise. ∎

We summarize what we have learned over the past few sections here.

• Knowing the “area under the curve” can be useful. One common example is: the area under a velocity curve is displacement.

• We have defined the definite integral, $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$, to be the signed area under $f$ on the interval $[a,b]$.

• While we can approximate a definite integral many ways, we have focused on using rectangles whose heights can be determined using: the Left Hand Rule, the Right Hand Rule and the Midpoint Rule.

• Sums of rectangles of this type are called Riemann sums.

• The exact value of the definite integral can be computed using the limit of a Riemann sum. We generally use one of the above methods as it makes the algebra simpler.

We first learned of derivatives through limits and then learned rules that made the process simpler. We know of a way to evaluate a definite integral using limits; in the next section we will see how the Fundamental Theorem of Calculus makes the process simpler. The key feature of this theorem is its connection between the indefinite integral and the definite integral.

## Exercises 5.3

### Terms and Concepts

1. 1.

A fundamental calculus technique is to use              to refine approximations to get an exact answer.

2. 2.

What is the upper bound in the summation $\displaystyle\sum_{i=7}^{14}(48i-201)$?

3. 3.

This section approximates definite integrals using what geometric shape?

4. 4.

T/F: A sum using the Right Hand Rule is an example of a Riemann Sum.

### Problems

In Exercises 5–12., write out each term of the summation and compute the sum.

1. 5.

$\displaystyle\sum_{i=2}^{4}i^{2}$

2. 6.

$\displaystyle\sum_{i=-1}^{3}(4i-2)$

3. 7.

$\displaystyle\sum_{i=-2}^{2}\sin(\pi i/2)$

4. 8.

$\displaystyle\sum_{i=1}^{10}5$

5. 9.

$\displaystyle\sum_{i=1}^{5}\frac{1}{i}$

6. 10.

$\displaystyle\sum_{i=1}^{6}(-1)^{i}i$

7. 11.

$\displaystyle\sum_{i=1}^{4}\left(\frac{1}{i}-\frac{1}{i+1}\right)$

8. 12.

$\displaystyle\sum_{i=0}^{5}(-1)^{i}\cos(\pi i)$

In Exercises 13–16., write each sum in summation notation.

1. 13.

$3+6+9+12+15$

2. 14.

$-1+0+3+8+15+24+35+48+63$

3. 15.

$\displaystyle\frac{1}{2}+\frac{2}{3}+\frac{3}{4}+\frac{4}{5}$

4. 16.

$\displaystyle 1-e+e^{2}-e^{3}+e^{4}$

In Exercises 17–24., evaluate the summation using Theorem 5.3.1.

1. 17.

$\displaystyle\sum_{i=1}^{10}5$

2. 18.

$\displaystyle\sum_{i=1}^{25}i$

3. 19.

$\displaystyle\sum_{i=1}^{10}(3i^{2}-2i)$

4. 20.

$\displaystyle\sum_{i=1}^{15}(2i^{3}-10)$

5. 21.

$\displaystyle\sum_{i=1}^{10}(-4i^{3}+10i^{2}-7i+11)$

6. 22.

$\displaystyle\sum_{i=1}^{10}(i^{3}-3i^{2}+2i+7)$

7. 23.

$1+2+3+\dotsb+99+100$

8. 24.

$1+4+9+\dotsb+361+400$

$\displaystyle\sum_{i=1}^{n}a_{i}=\sum_{i=1}^{k}a_{i}+\sum_{i=k+1}^{n}a_{i}$ , so

$\displaystyle\sum_{i=k+1}^{n}a_{i}=\sum_{i=1}^{n}a_{i}-\sum_{i=1}^{k}a_{i}$ .

Use this fact, along with other parts of Theorem 5.3.1, to evaluate the summations given in Exercises 25–28..

1. 25.

$\displaystyle\sum_{i=11}^{20}i$

2. 26.

$\displaystyle\sum_{i=16}^{25}i^{3}$

3. 27.

$\displaystyle\sum_{i=7}^{12}4$

4. 28.

$\displaystyle\sum_{i=5}^{10}4i^{3}$

In Exercises 29–32., express the limit as a definite integral.

1. 29.

$\displaystyle\lim_{n\to\infty}\frac{\pi}{n}\sum_{i=1}^{n}\frac{\sin\frac{\pi i% }{n}}{1+\frac{\pi i}{n}}$

2. 30.

$\displaystyle\lim_{n\to\infty}\sum_{i=1}^{n}\frac{3}{n}\biggl{(}2+\frac{3i}{n}% \biggr{)}\sqrt{1+\biggl{(}2+\frac{3i}{n}\biggr{)}^{3}}$

3. 31.

$\displaystyle\lim_{n\to\infty}\frac{5}{n}\sum_{i=1}^{n}\biggl{(}5\biggl{(}2+% \frac{5i}{n}\biggr{)}^{3}-4\biggl{(}2+\frac{5i}{n}\biggr{)}+7\biggr{)}$

4. 32.

$\displaystyle\lim_{n\to\infty}\frac{2}{n}\sum_{i=1}^{n}\frac{1+\frac{2i}{n}}{% \biggl{(}1+\frac{2i}{n}\biggr{)}^{2}+4}$

In Exercises 33–36., express the definite integral as a limit of a sum.

1. 33.

$\displaystyle\int_{2}^{5}4-2x\operatorname{d}\!x$

2. 34.

$\displaystyle\int_{-2}^{0}x^{2}+3x\operatorname{d}\!x$

3. 35.

$\displaystyle\int_{-\pi/2}^{\pi/2}\frac{\sin^{3}x}{2+\cos x}\operatorname{d}\!x$

4. 36.

$\displaystyle\int_{0}^{2}e^{x}\operatorname{d}\!x$

In Exercises 37–42., a definite integral $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$ is given.

1. (a)

Graph $f(x)$ on $[a,b]$.

2. (b)

Add to the sketch rectangles using the provided rule.

3. (c)

Approximate $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$ by summing the areas of the rectangles.

1. 37.

$\displaystyle\int_{-3}^{3}x^{2}\operatorname{d}\!x$, with 6 rectangles using the Left Hand Rule.

2. 38.

$\displaystyle\int_{0}^{2}(5-x^{2})\operatorname{d}\!x$, with 4 rectangles using the Midpoint Rule.

3. 39.

$\displaystyle\int_{0}^{\pi}\sin x\operatorname{d}\!x$, with 6 rectangles using the Right Hand Rule.

4. 40.

$\displaystyle\int_{1}^{3}\sqrt{10-x^{2}}\operatorname{d}\!x$ with 4 rectangles using the Right Hand Rule.

5. 41.

$\displaystyle\int_{1}^{2}\ln x\operatorname{d}\!x$, with 3 rectangles using the Midpoint Rule.

6. 42.

$\displaystyle\int_{1}^{9}\frac{1}{x}\operatorname{d}\!x$, with 4 rectangles using the Right Hand Rule.

In Exercises 43–48., a definite integral $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$ is given. As demonstrated in Examples 5.3.6 and 5.3.7, do the following.

1. (a)

Find a formula to approximate $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$ using $n$ subintervals and the provided rule.

2. (b)

Evaluate the formula using $n=10$, $100$ and $1,000$.

3. (c)

Find the limit of the formula, as $n\to\infty$, to find the exact value of $\displaystyle\int_{a}^{b}f(x)\operatorname{d}\!x$.

1. 43.

$\displaystyle\int_{0}^{1}x^{3}\operatorname{d}\!x$, using the Right Hand Rule.

2. 44.

$\displaystyle\int_{-1}^{1}3x^{2}\operatorname{d}\!x$, using the Left Hand Rule.

3. 45.

$\displaystyle\int_{-1}^{3}(3x-1)\operatorname{d}\!x$, using the Midpoint Rule.

4. 46.

$\displaystyle\int_{1}^{4}(2x^{2}-3)\operatorname{d}\!x$, using the Left Hand Rule.

5. 47.

$\displaystyle\int_{-10}^{10}(5-x)\operatorname{d}\!x$, using the Right Hand Rule.

6. 48.

$\displaystyle\int_{0}^{1}(x^{3}-x^{2})\operatorname{d}\!x$, using the Right Hand Rule.

1. 49.
Use six rectangles to approximate the area under the given graph of $f$ from $x=0$ to $x=12$, using: (a) The Left Hand Rule, (b) The Right Hand Rule, (c) The Midpoint Rule.
2. 50.
A car accelerates from 0 to 40 mph in 30 seconds. The speedometer reading at each 5 second interval during this time is given in the table below. Estimate how far the car travels during this 30 second period using the velocities at: (a) The beginning of each time interval. (b) The end of each time interval.
 $t$ (sec) 0 5 10 15 20 25 30 $v$ (mph) 0 6 14 23 30 36 40
3. 51.
Use Theorems 5.3.1 and 5.3.2 to justify the remaining property in Theorem 5.2.1: $\int_{a}^{b}k\cdot f(x)\operatorname{d}\!x=k\int_{a}^{b}f(x)\operatorname{d}\!x$
4. 52.
Use Theorems 5.3.1 and 5.3.2 to justify the remaining property in Theorem 5.3.3: If $f(x)\leq M$ for all $x$ in $[a,b]$, then $\int_{a}^{b}f(x)\operatorname{d}\!x\leq M(b-a).$

### Review

In Exercises 53–58., find an antiderivative of the given function.

1. 53.

$f(x)=5\sec^{2}x$

2. 54.

$\displaystyle f(x)=\frac{7}{x}$

3. 55.

$\displaystyle g(t)=4t^{5}-5t^{3}+8$

4. 56.

$\displaystyle g(t)=5\cdot e^{t}$

5. 57.

$\displaystyle g(t)=\cos t+\sin t$

6. 58.

$\displaystyle f(x)=\frac{1}{\sqrt{x}}$