Skip to main content

Section 1.3 Riemann Sums

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 to develop a technique to find the area of more complicated regions.

Consider the region given in Figure 1.1, which is the area under \(y=4x-x^2\) on \(\left[0,4\right]\text{.}\) What is the signed area of this region when the area above the \(x\)-axis is positive and below negative?

Figure 1.1. \(f(x) = 4x-x^2\)

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. How can we refine our approximation to make it better? The key to this section is this answer: use more rectangles.

Let's use four rectangles of equal width of \(1\text{.}\) This partitions the interval \(\left[0,4\right]\) into four subintervals, \(\left[0,1\right]\text{,}\) \(\left[1,2\right]\text{,}\) \(\left[2,3\right]\) and \(\left[3,4\right]\text{.}\) 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 1.2, the rectangle labelled “LHR” is drawn on the interval \(\left[2,3\right]\) with a height determined by the Left Hand Rule, namely \(f(2)=4\text{.}\)

  • The Right Hand Rule says the opposite: on each subinterval, evaluate the function at the right endpoint and make the rectangle that height. In Figure 1.2, the rectangle labelled “RHR” is drawn on the interval \(\left[0,1\right]\) with a height determined by the Right Hand Rule, namely \(f(1)=3\text{.}\)

  • The Midpoint Rule says that on each subinterval, evaluate the function at the midpoint and make the rectangle that height. In Figure 1.2, the rectangle labelled “MPR” is drawn on the interval \(\left[1,2\right]\) with a height determined by the Midpoint Rule, namely \(f(1.5)=3.75\text{.}\)

  • These are the three most common rules for determining the heights of approximating rectangles, but we are not forced to use one of these three methods. In Figure 1.2, the rectangle labelled “other” is drawn on the interval \(\left[3,4\right]\) with a height determined by choosing a random \(x\)-value on the interval \([3,4]\text{.}\) The chosen \(x\)-value is \(3.54\text{,}\) which yields a height of \(f(3.54)\text{.}\)

Figure 1.2. Approximating area using rectangles

Interactive Demonstration. Use the sliders to investigate the Left Hand Rule, Right Hand Rule and Midpoint Rule. The graph of \(y = 2\sin(x) \) is shown.

The following example will approximate the area under \(f(x) = 4x-x^2\) using these rules.

Example 1.4. Using the Left Hand, Right Hand and Midpoint Rules.

Approximate the area under \(f(x) = 4x-x^2\) on the interval \(\left[0,4\right]\) using the Left Hand Rule, the Right Hand Rule, and the Midpoint Rule, using four equally spaced subintervals.

Solution

We break the interval \(\left[0,4\right]\) into four subintervals as before. In Figure 1.3 we see four rectangles drawn on \(f(x) = 4x-x^2\) using the Left Hand Rule. (The areas of the rectangles are given in each figure.)

Figure 1.3. Approximating area using the Left Hand Rule

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

\begin{align*} f(0)\cdot 1 + f(1)\cdot 1+ f(2)\cdot 1+f(3)\cdot 1 \amp =\\ 0+3+4+3\amp = 10\text{.} \end{align*}

Figure 1.4 shows four rectangles drawn under \(f(x)\) using the Right Hand Rule; note how the \([3,4]\) subinterval has a rectangle of height 0.

Figure 1.4. Approximating area using the Right Hand Rule,

In this figure, these rectangles seem to be the mirror image of those found in Figure 1.3. (This is because of the symmetry of our shaded region.) Our approximation gives the same answer as before, though calculated a different way:

\begin{align*} f(1)\cdot 1 + f(2)\cdot 1+ f(3)\cdot 1+f(4)\cdot 1 \amp =\\ 3+4+3+0\amp = 10\text{.} \end{align*}

Figure 1.5 shows four rectangles drawn under \(f(x)\) using the Midpoint Rule.

Figure 1.5. Approximating area using the Midpoint Rule

This gives an approximation of the area as:

\begin{align*} f(0.5)\cdot 1 + f(1.5)\cdot 1+ f(2.5)\cdot 1+f(3.5)\cdot 1 \amp =\\ 1.75+3.75+3.75+1.75\amp = 11\text{.} \end{align*}

Our three methods provide two approximations of the area under \(f(x) = 4x-x^2\text{:}\) \(10\) and \(11\text{.}\)

It is hard to tell at this moment which is a better approximation: \(10\) or \(11\text{?}\) 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 (also called sigma notation) to solve this problem.

Definition 1.5. Sigma Notation.

Given the sum \(a_1+a_2+a_3+\dots+a_{n-1}+a_{n}\text{,}\) we use sigma notation to write the sum in the compact form

\begin{equation*} \sum_{i=1}^{n} a_i = a_1+a_2+a_3+\dots+a_{n-1}+a_n\text{,} \end{equation*}

where

\(\ds{\sum_{i=1}^{n} a_i}\) is read “the sum as \(i\) goes from \(1\) to \(n\) of \(a_i\)” ,
\(\ds\sum\) is the Greek letter sigma and used as the summation symbol,
the variable \(i\) is called the index and takes on only integer values,
the index \(i\) starts at \(i=1\) and ends at \(i=n\text{,}\) and
\(a_i\) represents the formula for the \(i\)-th term.

Note:

  1. The index is often denoted by \(i\text{,}\) \(k\) or \(n\) and must be written below the summation symbol.

  2. Do not mix the index up with the end-value of the index that must be written above the summation symbol.

  3. The index can start at any integer, but often we write the sum so that the index starts at 0 or 1.

Let's practice using this notation.

Example 1.6. Using Summation Notation.

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

  1. \(\ds\sum_{i=1}^6 a_i\)

  2. \(\ds\sum_{i=3}^7 (3a_i-4)\)

  3. \(\ds\sum_{i=1}^4 (a_i)^2\)

Solution
  1. We find:

    \begin{equation*} \begin{aligned}\sum_{i=1}^6 a_i \amp = a_1+a_2+a_3+a_4+a_5+a_6\\ \amp =1+3+5+7+9+11 \\ \amp =36. \end{aligned} \end{equation*}
  2. Note the starting value is different than 1:

    \begin{align*} \sum_{i=3}^7 (3a_i-4) \amp = (3a_3-4)+(3a_4-4)+(3a_5-4)+(3a_6-4)+(3a_7-4)\\ \amp = 11+17+23+29+35\\ \amp = 115\text{.} \end{align*}
  3. We find:

    \begin{equation*} \begin{aligned}\sum_{i=1}^4 (a_i)^2 \amp = (a_1)^2+(a_2)^2+(a_3)^2+(a_4)^2\\ \amp = 1^2+3^2+5^2+7^2 \\ \amp = 84 \end{aligned} \end{equation*}

The following theorems give some properties and formulas of summations that allow us to work with them without writing individual terms. Examples will follow.

Example 1.9. Evaluating Summations.

Evaluate \(\ds\sum_{i=1}^6 (2i-1)\text{.}\)

Solution
\begin{equation*} \begin{array}{lll} \ds\sum_{i=1}^6 (2i-1) \amp = \ds\sum_{i=1}^6 2i - \ds\sum_{i=1}^6 (1) \amp \text{ (using Summation Property 2) } \\[2.2ex] \amp = \ds{\left(2\sum_{i=1}^6 i \right)- 6} \amp \text{ (using Summation Properties 1 and 3) } \\[2.2ex] \amp = \ds{2\frac{6(6+1)}{2} - 6} \amp \text{ (using Summation Formula 1) } \\[2ex] \amp = 42-6 = 36 \end{array} \end{equation*}

We obtained the same answer without writing out all six terms. When dealing with small values of \(n\text{,}\) it may be faster to write the terms out by hand. However, Theorems 1.7 and 1.8 are incredibly important when dealing with large sums as we'll soon see.

Example 1.10. Creating Right Hand, Left Hand and Midpoint Rule Formulas.

Suppose a continuous function \(y=f(x)\) is defined on the interval \([0,4]\text{.}\) Create the summation formulas for approximating the area of \(f\) on the given interval using the Right Hand, Left Hand and Midpoint Rules.

Solution

We will do some careful preparation. We start with a number line where \(\left[0,4\right]\) is divided into sixteen equally spaced subintervals with partition \(P=\{x_1,x_2,\dots,x_{17}\}\text{.}\)

We denote \(0\) as \(x_1\text{;}\) we have marked the values of \(x_5\text{,}\) \(x_9\text{,}\) \(x_{13}\) and \(x_{17}\text{.}\) We could mark them all, but the figure would get crowded. While it is easy to figure that \(x_{10} = 2.25\text{,}\) in general, we want a method of determining the value of \(x_i\) without consulting the figure. Consider:

\begin{align*} x_i \amp = x_1 + (i-1)\Delta x\\ \text{where:} \amp \\ x_1 \amp : \mbox{starting value}\\ (i-1) \amp : \mbox{number of subintervals between \(x_1\) and \(x_i\)}\\ \Delta x \amp : \mbox{subinterval width} \end{align*}

So \(x_{10} = x_1 + 9(4/16) = 2.25\text{.}\)

If we had partitioned \(\left[0,4\right]\) into 100 equally spaced subintervals with partition \(P=\{x_1,x_2,\dots,x_{101}\}\text{,}\) each subinterval would have length \(\Delta x=4/100 = 0.04\text{.}\) We could compute \(x_{32}\) as

\begin{equation*} x_{32} = 0 + 31(4/100) = 1.24\text{.} \end{equation*}

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

Given any subdivision of \(\left[0,4\right]\text{,}\) the first subinterval is \(\left[x_1,x_2\right]\text{;}\) the second is \(\left[x_2,x_3\right]\text{;}\) the \(i^\text{ th }\) subinterval is \(\left[x_i,x_{i+1}\right]\text{.}\) Now recall our work in Example 1.4 and the Figures 1.31.4 and 1.5.

  • When using the Left Hand Rule, the height of the \(i^\text{ th }\) rectangle will be \(f(x_i)\text{.}\)

  • When using the Right Hand Rule, the height of the \(i^\text{ th }\) rectangle will be \(f(x_{i+1})\text{.}\)

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

Thus approximating the area under \(f\) on \(\left[0,4\right]\) with sixteen equally spaced subintervals can be expressed as follows, where \(\Delta x = 4/16 = 1/4\text{:}\)

Left Hand Rule: \(\ds \sum_{i=1}^{16} f(x_i)\cdot\frac{1}{4}\)
Right Hand Rule: \(\ds \sum_{i=1}^{16} f(x_{i+1})\cdot\frac{1}{4}\)
Midpoint Rule: \(\ds \sum_{i=1}^{16} f\left(\frac{x_i+x_{i+1}}2\right)\cdot\frac{1}{4}\)

We use these formulas in the following example.

Example 1.11. Approximating Area Using Sums.

Approximate the area under \(f(x) = 4x-x^2\) on \(\left[0,4\right]\) using the Right Hand Rule and summation formulas with sixteen and 1000 equally spaced intervals.

Solution

Using sixteen equally spaced intervals and the Right Hand Rule, we can approximate the area as

\begin{equation*} \sum_{i=1}^{16}f(x_{i+1})\Delta x\text{.} \end{equation*}

We have \(\Delta x = 4/16 = 0.25\text{.}\) Since \(x_i = 0+(i-1)\Delta x\text{,}\) we have

\begin{equation*} x_{i+1} = 0 + \big((i+1)-1\big)\Delta x = i\Delta x \end{equation*}

Using the summation formulas, consider:

\begin{align*} \sum_{i=1}^{16} f(x_{i+1})\Delta x \amp = \sum_{i=1}^{16} f(i\Delta x) \Delta x\\ \amp = \sum_{i=1}^{16} \big(4i\Delta x - (i\Delta x)^2\big)\Delta x\\ \amp = \sum_{i=1}^{16} (4i\Delta x^2 - i^2\Delta x^3)\\ \amp = (4\Delta x^2)\sum_{i=1}^{16} i - \Delta x^3 \sum_{i=1}^{16} i^2\\ \amp = (4\Delta x^2)\frac{16\cdot 17}{2} - \Delta x^3 \frac{16(17)(33)}6\\ \amp = 4\cdot 0.25^2\cdot 136-0.25^3\cdot 1496\\ \amp =10.625 \end{align*}

We were able to sum up the areas of sixteen rectangles with very little computation. The function and the sixteen rectangles are graphed below. While some rectangles over–approximate the area, other under–approximate the area (by about the same amount). Thus our approximate area of \(10.625\) is likely a fairly good approximation.

Notice that by changing the \(16\) to \(1,000\) (and appropriately changing the value of \(\Delta x\)), we can use the above equation to sum up \(1000\) rectangles! Now note that \(\Delta x = 4/1000 = 0.004\text{:}\)

\begin{align*} \sum_{i=1}^{1000} f(x_{i+1})\Delta x \amp = (4\Delta x^2)\sum_{i=1}^{1000} i - \Delta x^3 \sum_{i=1}^{1000} i^2\\ \amp = (4\Delta x^2)\frac{1000\cdot 1001}{2} - \Delta x^3 \frac{1000(1001)(2001)}6\\ \amp = 4\cdot 0.004^2\cdot 500500-0.004^3\cdot 333,833,500\\ \amp =10.666656 \end{align*}

Using many, many rectangles, we have a likely good approximation of the area under \(f(x) = 4x-x^2\) of \(\approx 10.666656\text{.}\)

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

  1. Each rectangle has the same width, which we referred to as \(\Delta x\text{,}\) and

  2. Each rectangle's height is determined by evaluating \(f(x)\) at a particular point in each subinterval. For instance, the Left Hand Rule states that each rectangle's height is determined by evaluating \(f(x)\) at the left hand endpoint of the subinterval the rectangle lives on.

One could partition an interval \(\left[a,b\right]\) with subintervals that did not have the same width. We refer to the length of the first subinterval as \(\Delta x_1\text{,}\) the length of the second subinterval as \(\Delta x_2\text{,}\) and so on, giving the length of the \(i^\text{ th }\) subinterval as \(\Delta x_i\text{.}\) Also, one could determine each rectangle's height by evaluating \(f(x)\) at any point in the \(i^\text{ th }\) subinterval. We refer to the point picked in the first subinterval as \(c_1\text{,}\) the point picked in the second subinterval as \(c_2\text{,}\) 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)\text{,}\) and the area of the \(i^\text{ th }\) rectangle would be \(f(c_i)\Delta x_i\text{.}\)

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 1.12. Riemann Sum.

Let \(f(x)\) be defined on the closed interval \(\left[a,b\right]\) and let \(P=\{x_1,x_2,\dots,x_{n+1}\}\) be a partition of \(\left[a,b\right]\text{,}\) with

\begin{equation*} a=x_1 \lt x_2 \lt \ldots \lt x_n \lt x_{n+1}=b\text{.} \end{equation*}

Let \(\Delta x_i\) denote the length of the \(i^\text{ th }\) subinterval \([x_i,x_{i+1}]\) and let \(c_i\) denote any value in the \(i^\text{ th }\) subinterval. The sum

\begin{equation*} \sum_{i=1}^n f(c_i)\Delta x_i \end{equation*}

is a Riemann sum of \(f(x)\) on \(\left[a,b\right]\text{.}\)

Riemann sums are typically calculated using one of the three rules we have introduced. The uniformity of construction makes computations easier. Before working another example, let's summarize some of what we have learned in a convenient way.

Riemann Sums Using Rules (Left - Right - Midpoint).

Consider a function \(f(x)\) defined on an interval \(\left[ a, b \right]\text{.}\) The area under this curve is approximated by

\begin{equation*} \sum_{i=1}^n f(c_i)\Delta x_i\text{.} \end{equation*}
  1. When the \(n\) subintervals have equal length, \(\ds \Delta x_i = \Delta x = \frac{b-a}n\text{.}\)

  2. The \(i^\text{ th }\) term of the partition is \(x_i = a + (i-1)\Delta x\text{.}\) (This makes \(x_{n+1} = b\text{.}\))

  3. The Left Hand Rule summation is: \(\ds \sum_{i=1}^n f(x_i)\Delta x\text{.}\)

  4. The Right Hand Rule summation is: \(\ds \sum_{i=1}^n f(x_{i+1})\Delta x\text{.}\)

  5. The Midpoint Rule summation is: \(\ds \sum_{i=1}^n f\left(\frac{x_i+x_{i+1}}{2}\right)\Delta x\text{.}\)

Figure 1.6 shows the approximating rectangles of a Riemann sum. 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.

Figure 1.6. General Riemann sum to approximate the area under \(f(x) = 4x-x^2\)

Let's do another example.

Example 1.13. Approximating Area Using Sums.

Approximate the area under \(f(x) = (5x+2)\) on the interval \(\left[ -2, 3 \right]\) using the Midpoint Rule and ten equally spaced intervals.

Solution

Following the above discussion, we have

\begin{gather*} \Delta x = \frac{3 - (-2)}{10} = 1/2\\ x_i = (-2) + (1/2)(i-1) = i/2-5/2\text{.} \end{gather*}

As we are using the Midpoint Rule, we will also need \(x_{i+1}\) and \(\ds \frac{x_i+x_{i+1}}2\text{.}\) Since \(x_i = i/2-5/2\text{,}\)

\begin{equation*} x_{i+1} = (i+1)/2 - 5/2 = i/2 -2\text{.} \end{equation*}

This gives

\begin{equation*} \frac{x_i+x_{i+1}}2 = \frac{(i/2-5/2) + (i/2-2)}{2} = \frac{i-9/2}{2} = i/2 - 9/4\text{.} \end{equation*}

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

\begin{align*} \sum_{i=1}^{10} f\left(\frac{x_i+x_{i+1}}{2}\right)\Delta x \amp = \sum_{i=1}^{10} f(i/2 - 9/4)\Delta x\\ \amp = \sum_{i=1}^{10} \big(5(i/2-9/4) + 2\big)\Delta x\\ \amp = \Delta x\sum_{i=1}^{10}\left[\left(\frac{5}{2}\right)i - \frac{37}{4}\right]\\ \amp = \Delta x\left(\frac{5}2\sum_{i=1}^{10} (i) - \sum_{i=1}^{10}\left(\frac{37}{4}\right)\right)\\ \amp = \frac12\left(\frac52\cdot\frac{10(11)}{2} - 10\cdot\frac{37}4\right)\\ \amp = \frac{45}2 = 22.5 \end{align*}

Note the graph below of \(f(x) = 5x+2\) and its area-approximation using the Midpoint Rule and 10 evenly spaced subintervals. The regions whose areas are computed are triangles, meaning we can find the exact answer without summation techniques. We find that the exact answer is indeed \(22.5\text{.}\) 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 the partition width is small, these two amounts are about equal and these errors almost “cancel each other out.” In this example, since our function is a line, these errors are exactly equal and they do cancel each other out, giving us the exact answer.

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

Notice in the previous example that while we used ten equally spaced intervals, the number “10” didn't play a big role in the calculations until the very end. Mathematicians love 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 1.14. Approximating Area Using Sums.

Revisit \(f(x) = 4x-x^2\) on the interval \(\left[ 0, 4 \right]\) yet again. Approximate the area under this curve using the Right Hand Rule with \(n\) equally spaced subintervals.

Solution

We know \(\Delta x = \frac{4-0}{n} = 4/n\text{.}\) We also find \(x_i = 0 + \Delta x(i-1) = 4(i-1)/n\text{.}\) The Right Hand Rule uses \(x_{i+1}\text{,}\) which is \(x_{i+1} = 4i/n\text{.}\) We construct the Right Hand Rule Riemann sum as follows.

\begin{align*} \sum_{i=1}^n f(x_{i+1})\Delta x \amp = \sum_{i=1}^n f\left(\frac{4i}{n}\right) \Delta x\\ \amp = \sum_{i=1}^n \left[4\frac{4i}n-\left(\frac{4i}n\right)^2\right]\Delta x\\ \amp = \sum_{i=1}^n \left(\frac{16\Delta x}{n}\right)i - \sum_{i=1}^n \left(\frac{16\Delta x}{n^2}\right)i^2\\ \amp = \left(\frac{16\Delta x}{n}\right)\sum_{i=1}^n i - \left(\frac{16\Delta x}{n^2}\right)\sum_{i=1}^n i^2\\ \amp = \left(\frac{16\Delta x}{n}\right)\cdot \frac{n(n+1)}{2} - \left(\frac{16\Delta x}{n^2}\right)\frac{n(n+1)(2n+1)}{6} \\ \amp =\frac{32(n+1)}{n} - \frac{32(n+1)(2n+1)}{3n^2} \\ \amp = \frac{32}{3}\left(1-\frac{1}{n^2}\right) \end{align*}

The result is an amazing, easy to use formula. To approximate the area with ten equally spaced subintervals and the Right Hand Rule, set \(n=10\) and compute

\begin{equation*} \frac{32}{3}\left(1-\frac{1}{10^2}\right) = 10.56\text{.} \end{equation*}

Recall how earlier we approximated the area with 4 subintervals; with \(n=4\text{,}\) the formula gives 10, our answer as before.

It is now easy to approximate the area with \(1,000,000\) subintervals! Hand-held calculators will round off the answer a bit prematurely giving an answer of \(10.66666667\text{.}\) (The actual answer is \(10.666666666656\text{.}\))

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\text{,}\) we know that the corresponding Right Hand Rule Riemann sum is:

\begin{equation*} \frac{32}{3}\left(1-\frac{1}{n^2}\right)\text{.} \end{equation*}

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\text{,}\) we get the exact area. That is,

\begin{align*} \lim_{n\rightarrow \infty} \frac{32}{3}\left(1-\frac{1}{n^2}\right) \amp = \frac{32}{3}\left(1-0\right)\\ \amp = \frac{32}{3} = 10.\overline{6} \end{align*}

This is a fantastic result. By considering \(n\) equally–spaced subintervals, we obtained a formula for an approximation of the area that involved our variable \(n\text{.}\) 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 1.15. Approximating Area With a Formula, Using Sums.

Find a formula that approximates the area under \(f(x) = x^3\) on the interval \(\left[-1, 5 \right]\) using the Right Hand Rule and \(n\) equally spaced subintervals, then take the limit as \(n\to\infty\) to find the exact area.

Solution

We have \(\Delta x = \frac{5-(-1)}{n} = 6/n\text{.}\) We have \(x_i = (-1) + (i-1)\Delta x\text{;}\) as the Right Hand Rule uses \(x_{i+1}\text{,}\) we have \(x_{i+1} = (-1) + i\Delta x\text{.}\)

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

\begin{align*} \sum_{i=1}^n f(x_{i+1})\Delta x \amp = \sum_{i=1}^n f(-1+i\Delta x)\Delta x\\ \amp = \sum_{i=1}^n (-1+i\Delta x)^3\Delta x\\ \amp = \sum_{i=1}^n \big((i\Delta x)^3 -3(i\Delta x)^2 + 3i\Delta x -1\big)\Delta x\\ \amp = \sum_{i=1}^n \big(i^3\Delta x^4 - 3i^2\Delta x^3 + 3i\Delta x^2 -\Delta x\big)\\ \amp = \Delta x^4 \sum_{i=1}^ni^3 -3\Delta x^3 \sum_{i=1}^n i^2+ 3\Delta x^2 \sum_{i=1}^n i - \sum_{i=1}^n \Delta x\\ \amp = \Delta x^4 \left(\frac{n(n+1)}{2}\right)^2 -3\Delta x^3 \frac{n(n+1)(2n+1)}{6}+ 3\Delta x^2 \frac{n(n+1)}{2} - n\Delta x\\ \amp = \frac{1296}{n^4}\cdot\frac{n^2(n+1)^2}{4} - 3\frac{216}{n^3}\cdot\frac{n(n+1)(2n+1)}{6} + 3\frac{36}{n^2}\frac{n(n+1)}2 -6\\ \amp =156 + \frac{378}n + \frac{216}{n^2} \end{align*}

Once again, we have found a compact formula for approximating the area with \(n\) equally spaced subintervals and the Right Hand Rule. The graph below depicts the graph of \(f\) and its area-approximation using the Right Hand Rule and 10 evenly spaced subintervals. This yields an approximation of \(195.96\text{.}\) Using \(n=100\) gives an approximation of \(159.802\text{.}\)

Now find the exact answer using a limit:

\begin{equation*} \lim_{n\to\infty} \left(156 + \frac{378}n + \frac{216}{n^2}\right) = 156\text{.} \end{equation*}

We have used limits to evaluate exactly given definite limits. 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

\begin{equation*} \sum_{i=1}^n f(x_{i+1})\Delta x \end{equation*}

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

Viewed in this manner, we can think of the summation as a function of \(n\text{.}\) 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 function \(f(x)\) defined on the interval \(\left[ a,b\right]\) let:

  • \(\ds S_L(n) = \sum_{i=1}^n f(x_i)\Delta x\text{,}\) the sum of equally spaced rectangles formed using the Left Hand Rule,

  • \(\ds S_R(n) = \sum_{i=1}^n f(x_{i+1})\Delta x\text{,}\) the sum of equally spaced rectangles formed using the Right Hand Rule, and

  • \(\ds S_M(n) = \sum_{i=1}^n f\left(\frac{x_i+x_{i+1}}{2}\right)\Delta x\text{,}\) the sum of equally spaced rectangles formed using the Midpoint Rule.

The following theorem states that we can use any of our three rules to find the exact value of the area under \(f(x)\) on \(\left[ a,b \right]\text{.}\) 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)\text{,}\) where \(c_i\) is any point in the \(i^\text{ th }\) subinterval, as discussed earlier.

The theorem goes on to state that the rectangles do not need to be of the same width. Using the notation of Definition 1.12, let \(\Delta x_i\) denote the length of the \(i^\text{ th }\) subinterval in a partition of \([a,b]\text{.}\) Now let \(||\Delta x||\) represent the length of the largest subinterval in the partition: that is, \(||\Delta x||\) is the largest of all the \(\Delta x_i\)'s. If \(||\Delta x||\) is small, then \([a,b]\) must be partitioned into many subintervals, since all subintervals must have small lengths. “Taking the limit as \(||\Delta x||\) 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

\begin{equation*} \lim_{||\Delta x||\to 0}\sum_{i=1}^nf(c_i)\Delta x_i \end{equation*}

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 following theorem states that, for a sufficiently nice function, we can use any of our three rules to find the area under \(f(x)\) over \([a,b]\text{.}\)

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.

  • While we can approximate the area under a curve in 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 area can be computed using the limit of a Riemann sum. We generally use one of the above methods as it makes the algebra simpler.

Exercises for Section 1.3.

Find the area under \(y=2x\) between \(x=0\) and any positive value for \(x\text{.}\)

Answer
\(\ds x^2\)
Solution

Let \(x=a\) denote an arbitrary, positive point. Then we wish to find the area under the curve,

First consider approximating the area by the Left Hand Rule using \(n\) equally spaced subintervals. That is,

\begin{equation*} \Delta x = \frac{a-0}{n}=\frac{a}{n}\text{,} \end{equation*}

and partition

\begin{equation*} x_1 = 0, \ x_2 = \frac{a}{n}, \dots, \ x_{n+1} = a\text{.} \end{equation*}

So we see that for general \(i=1,\dots, \ n\text{:}\)

\begin{equation*} x_i=\frac{(i-1)a}{n}\text{.} \end{equation*}

Therefore, our approximation \(S_L(n)\) is

\begin{equation*} \begin{split} S_L(n) \amp = \sum_{i=1}^n f(x_i)\Delta x \\ \amp = \sum_{i=1}^n f\left(\frac{(i-1)a}{n}\right)\frac{a}{n} \\ \amp =\frac{a}{n}\sum_{i=1}^n 2\left(\frac{(i-1)a}{n}\right) \\ \amp = \frac{2a^2}{n^2}\sum_{i=1}^n (i-1)\\ \amp = \frac{2a^2}{n^2} \left(\frac{1}{2}n(n+1) - n\right) = a^2+\frac{a^2}{n}-2\frac{a^2}{n}. \end{split} \end{equation*}

The exact area \(A\) can be found by taking the limit

\begin{equation*} A=\lim_{n\to \infty} S_L(n) = \lim_{n\to \infty} \left(a^2-\frac{a^2}{n}\right) = a^2\text{.} \end{equation*}

Therefore, the area under the curve \(y=2x\) on the interval \([0,a]\) is \(a^2\) for any \(a>0\text{.}\)

Find the area under \(y=4x\) between \(x=0\) and any positive value for \(x\text{.}\)

Answer
\(\ds 2x^2\)
Solution

Let \(x=a\) denote an arbitrary, positive point. Then we wish to find the area under the curve,

First consider approximating the area by the Left Hand Rule using \(n\) equally spaced subintervals. That is,

\begin{equation*} \Delta x = \frac{a-0}{n}=\frac{a}{n}\text{,} \end{equation*}

and partition

\begin{equation*} x_1 = 0,\ x_2 = \frac{a}{n}, \dots, \ x_{n+1} = a\text{.} \end{equation*}

So we see that for general \(i=1,\dots, \ n\text{:}\)

\begin{equation*} x_i=\frac{(i-1)a}{n}\text{.} \end{equation*}

Therefore, our approximation \(S_L(n)\) is

\begin{equation*} \begin{split} S_L(n) \amp = \sum_{i=1}^n f(x_i)\Delta x \\ \amp = \sum_{i=1}^n f\left(\frac{(i-1)a}{n}\right)\frac{a}{n} \\ \amp =\frac{a}{n}\sum_{i=1}^n 4\left(\frac{(i-1)a}{n}\right) \\ \amp = \frac{4a^2}{n^2}\sum_{i=1}^n (i-1)\\ \amp = \frac{4a^2}{n^2} \left(\frac{1}{2}n(n+1) - n\right) = 2a^2+2\frac{a^2}{n}-4\frac{a^2}{n}. \end{split} \end{equation*}

The exact area \(A\) can be found by taking the limit

\begin{equation*} A=\lim_{n\to \infty} S_L(n) = \lim_{n\to \infty} \left(2a^2-2\frac{a^2}{n}\right) = 2a^2\text{.} \end{equation*}

Therefore, the area under the curve \(y=4x\) on the interval \([0,a]\) is \(2a^2\) for any \(a>0\text{.}\)

Find the area under \(y=4x\) between \(x=2\) and any positive value for \(x\) bigger than 2.

Answer
\(\ds 2x^2-8\)
Solution

We now wish to find the area under the curve \(y=4x\) on the interval \([2,b]\text{,}\) for any \(b>2\text{.}\)

We solve this problem using the same method as above, now with

\begin{equation*} \Delta x = \frac{b-2}{n}, \ x_1=2, x_2=2+\frac{b-2}{n}, \dots,x_{n+1}=b \end{equation*}

Therefore,

\begin{equation*} x_i = 2+\frac{b-2}{n}(i-1) i=1,2,\dots,n\text{.} \end{equation*}

Thus,

\begin{equation*} \begin{split} S_L(n) \amp = \sum_{i=1}^n f(x_i)\Delta x \\ \amp = \sum_{i=1}^n f\left(2+\frac{b-2}{n}(i-1)\right)\frac{b-2}{n} \\ \amp =\frac{b-2}{n}\sum_{i=1}^n 4\left(2+\frac{b-2}{n}(i-1)\right) \\ \amp = \frac{b-2}{n}\left(\sum_{i=1}^n 8+ 4\frac{b-2}{n}\sum_{i=1}^n (i-1) \right)\\ \amp = \frac{b-2}{n}\left(8n +4\frac{b-2}{n} \left(\frac{1}{2}n(n+1)-n\right) \right)\\ \amp = 8(b-2) + \frac{2(b-2)^2}{n}(n+1) - \frac{4(b-2)^2}{n}. \end{split} \end{equation*}

Since we will be taking the limit \(\displaystyle\lim_{n\to\infty}S_L(n)\text{,}\) any term with \(n\) (or a higher power) in the denominator will go to zero. We then see that the desired area \(A\) is

\begin{equation*} A = 8(b-2)+2(b-2)^2 = 2b^2-8\text{.} \end{equation*}

Note: Of course, we could have used our answer from Exercise 1.3.2. The area under \(y=4x\) on the interval \([0,2]\) (i.e. \(a=2\)) is \(2a^2 = 8\text{,}\) and the area under the interval \([0,b]\) is \(2b^2\text{.}\) Therefore, the area under \(y=4x\) on the interval \([2,b]\) is the difference, \(2b^2-8\text{.}\)

Find the area under \(y=4x\) between any two positive values for \(x\text{,}\) say \(a\lt b\text{.}\)

Answer
\(\ds 2b^2-2a^2\)
Solution

Now consider the fully generalized case: the area under \(y=4x\) on the interval \([a,b]\text{,}\) with \(a,b \geq 0\) and \(b > a\text{.}\)

We again use the Left Hand Rule and \(n\) equally spaced subintervals. That is,

\begin{equation*} \Delta x = \frac{b-a}{n}, \ x_i = a+\frac{b-a}{n}(i-1) i=1,2,\dots,n\text{.} \end{equation*}

And so our approximation is

\begin{equation*} \begin{split} S_L(n) \amp = \sum_{i=1}^n f(x_i)\Delta x \\ \amp = \sum_{i=1}^n f\left(a+\frac{b-a}{n}(i-1)\right)\frac{b-a}{n} \\ \amp =\frac{b-a}{n}\sum_{i=1}^n 4\left(a+\frac{b-a}{n}(i-1)\right) \\ \amp = \frac{b-a}{n}\left(\sum_{i=1}^n 4a+ 4\frac{b-a}{n}\sum_{i=1}^n (i-1) \right)\\ \amp = \frac{b-a}{n}\left(4an +4\frac{b-a}{n} \left(\frac{1}{2}n(n+1)-n\right) \right)\\ \amp =4a(b-a) + \frac{2(b-a)^2}{n}(n+1)-\frac{4(b-a)^2}{n} \end{split} \end{equation*}

We find that

\begin{equation*} A = \lim_{n\to\infty}S_L(n) = 4a(b-a) + 2(b-a)^2 = 2b^2-2a^2\text{.} \end{equation*}

To check our answer, we again use the solution to Exercise 1.3.2. The area under \(y=4x\) from 0 to \(b\) is \(2b^2\text{,}\) and the area under the curve from 0 to \(a\) is \(2a^2\text{.}\) Therefore, the area on the interval \([a,b]\) must be \(2b^2-2a^2\text{.}\)

Let \(\ds f(x)=x^2+3x+2\text{.}\) Approximate the area under the curve between \(x=0\) and \(x=2\) using 4 rectangles and also using 8 rectangles.

Answer
4 rectangles: \(41/4=10.25\text{,}\) 8 rectangles: \(183/16= 11.4375\)
Solution

We wish to approximate the area under the curve \(f(x)=x^2+3x+2\) on the interval \([0,2]\) using \(n=8\) rectangles.

We have:

\begin{equation*} \Delta x = \frac{2-0}{8} = \frac{1}{4}, \ x_{i} = 0 + \Delta x (i-1) = \frac{1}{4} (i-1) i=1, \dots, \ 8\text{.} \end{equation*}

Now, solve the problem using the Midpoint Rule:

\begin{equation*} \begin{split} S_M \amp = \sum_{i=1}^8 f\left(\frac{x_i + x_{i+1}}{2}\right)\Delta x\\ \amp = \frac{1}{4} \sum_{i=1}^8 f\left(\frac{i}{4}-\frac{1}{8}\right)\\ \amp = \frac{1}{4} \sum_{i=1}^8 \left( \left(\frac{i}{4}-\frac{1}{8}\right)^2 + 3\left(\frac{i}{4}-\frac{1}{8}\right) + 2\right) \\ \amp = \frac{1}{4} \sum_{i=1}^8 \left(\frac{i^2}{16} + \frac{11i}{16} + \frac{106}{64}\right)\\ \amp = \frac{1}{4} \left(\frac{1}{16} \sum_{i=1}^8 i^2 + \frac{11}{16} \sum_{i=1}^8 i + \frac{106}{64}\right)\\ \amp = \frac{1}{4} \left(\frac{405}{8}\right) = \frac{405}{32} \end{split} \end{equation*}

Therefore, our approximation is

\begin{equation*} A \approx \frac{405}{32} = 12.65625\text{.} \end{equation*}

The exact area is \(\frac{38}{3}\approx 12.667\) and so this is an underestimate.

Note: Using a different method (such as Right Hand Rule or Left Hand Rule) will give a slightly different answer.

Let \(\ds f(x)=x^2-2x+3\text{.}\) Approximate the area under the curve between \(x=1\) and \(x=3\) using 4 rectangles.

Answer
\(23/4\)
Solution

We now approximate the area under the curve \(f(x)=x^2-2x+3\) on the interval \([1,3]\) using \(n=4\) rectangles.

We will setup this problem using the Right Hand Rule:

\begin{equation*} \Delta x = \frac{3-1}{4} = \frac{1}{2}, \ x_{i+1} = 1+\frac{1}{2}i i=1,2,3,4\text{.} \end{equation*}

Therefore, our approximation is

\begin{equation*} \begin{split} S_R \amp = \sum_{i=1}^4 f(x_{i+1})\Delta x\\ \amp = \frac{1}{2} \sum_{i=1}^4 f\left(1+\frac{1}{2}i\right) \\ \amp =\frac{1}{2} \sum_{i=1}^4 \left[\left( 1+\frac{1}{2}i\right)^2 - 2\left( 1+\frac{1}{2}i\right) + 3\right]\\ \amp = \frac{1}{2} \left[\left((3/2)^2 - 2(3/2) + 3\right)+ \left(2^2-2(2)+3\right) + \dots + \left(3^2-2(3)+3\right)\right]\\ \amp = \frac{1}{2} \left(\frac{31}{2}\right) \end{split} \end{equation*}

Therefore, our approximation is

\begin{equation*} A \approx \frac{31}{4} = 7.75\text{.} \end{equation*}

The exact area is \(20/3 \approx 6.667\) and so this is an overestimate (which we would expect if we were to draw the rectangles on the graph above).

Note: Using a different method (such as Midpoint or Left Hand Rule) will give a slightly different answer.