When a rate of change is a simple function (piecewise constant), we can compute the definite integral as a summation of the increments. Each increment is the product of the rate of change times the width of the subinterval in the partition. When a rate of change is not simple (varying), we can approximate the total change by using simple functions that are either above or below the true rate. If we can make these approximations as good as we desire, then there is a limiting value and that value is defined as the definite integral.

The approximations to the definite integral using simple functions are called Riemann sums. In this section, we will learn how to create Riemann sums using a uniform partition. The Riemann sum will depend on the number of increments. The definite integral will be the limit of this sum as the number of increments goes to infinity.

Subsection4.3.1Uniform Partitions

Recall that a partition \(P\) of an interval \([a,b]\) is an increasing, finite sequence \(P = (x_0, x_1, \ldots, x_n)\) with \(x_0=a\) and \(x_n=b\) and \(x_{k-1} \lt x_{k}\text{.}\) Adjacent terms in the sequence define subintervals, \(I_k = [x_{k-1}, x_{k}]\text{,}\) which has a width increment of size \(\nabla x_k = x_{k} - x_{k-1}\text{.}\) A uniform partition of an interval \([a,b]\) is a partition in which all increments are the same size.

Definition4.3.1Uniform Partition

The uniform partition of an interval \([a,b]\) of size \(n\) is the partition with equal increments

\begin{equation*}
\nabla x_k = \Delta x = \frac{b-a}{n}\text{.}
\end{equation*}

The partition points are defined by the arithmetic sequence

\begin{equation*}
x_k = a + k \cdot \Delta x, \quad k=0, 1, \ldots, n.
\end{equation*}

The \(k\)th subinterval is \(I_k = [a+(k-1)\Delta x, a+k \Delta x]\text{.}\)

The definition of the uniform partition suggests the basic steps required to create such a partition.

Identify the interval \([a,b]\) and the size of partition \(n\text{.}\)

Compute the partition increment size

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

which is the total width of the interval divided by the number of subintervals.

Create the partition points by using an arithmetic sequence with initial value \(x_0=a\) and increment size \(\Delta x\) (just calculated).

Example4.3.2

Find the uniform partition of \([1,4]\) of size \(n=8\text{.}\)

The interval uses \(a=1\text{,}\) \(b=4\) and \(n=8\text{.}\) Consequently we can compute

\begin{equation*}
\Delta x = \frac{b-a}{n} = \frac{4-1}{8} = \frac{3}{8}.
\end{equation*}

Next, we define the partition points,

\begin{equation*}
x_k = a + k \Delta x = 1 + k \cdot \frac{3}{8} = 1 + \frac{3}{8} k.
\end{equation*}

In particular, the partition includes the points shown in the table below.

\(k\)

\(x_k\)

0

\(1\)

1

\(1+\frac{3}{8} = 1 \frac{3}{8}\)

2

\(1+\frac{6}{8} = 1 \frac{6}{8}\)

3

\(1+\frac{9}{8} = 2 \frac{1}{8}\)

4

\(1+\frac{12}{8} = 2 \frac{4}{8}\)

5

\(1+\frac{15}{8} = 2 \frac{7}{8}\)

6

\(1+\frac{18}{8} = 3 \frac{2}{8}\)

7

\(1+\frac{21}{8} = 3 \frac{5}{8}\)

8

\(1+\frac{24}{8} = 4\)

One of the tasks required in computing Riemann sums will involve evaluating a function at these partition points. This is yet another example of the importance of composition of functions in that we replace the independent variable (input) of the function with a formula for the partition point of interest.

Example4.3.3

Evaluate \(f(x_k)\) where \(f(x) = x^2\) and \(x_k\) is a point in the uniform partition of \([1,4]\) of size \(n\text{.}\)

We start by defining the partition. The interval \([1,4]\) means that \(a=1\) and \(b=4\text{,}\) as in the previous example. However, the size of the partition \(n\) is not specified, so we use the variable itself to compute the increment size,

\begin{equation*}
\Delta x = \frac{b-a}{n} = \frac{4-1}{n} = \frac{3}{n}.
\end{equation*}

Once the increment is known, we can define the partition points which is an arithmetic sequence with \(x_0=1\) and increments \(\Delta x\) to define

\begin{equation*}
x_k = 1 + k \Delta x = 1+ k \cdot \frac{3}{n} = 1 + \frac{3k}{n}.
\end{equation*}

Once the formula for the partition point is known, we use composition with \(f(x)=x^2\) and then expand the formula.

From this section, you should be able to write down the formula for the points in a uniform partition of an interval whether the size of the partition is given as a specific number or as an unspecified value. Using this formula, you should also be able to use that formula to evaluate a function at the partition points.

Subsection4.3.2Uniform Riemann Sums

Recall that a simple function is a piecewise function that is constant on each subinterval defined by the partition. We know how to compute the accumulated change (definite integral) for every simple function. Suppose that we had any function \(f(x)\) representing a rate of change of some quantity \(Q\) and we wanted to determine the resulting increment of change

as \(x\) changes from \(x=a\) to \(x=b\text{.}\) A Riemann sum approximates this definite integral by approximating the function \(f(x)\) by a simple function defined on a partition of \([a,b]\text{.}\)

A Riemann sum involves two steps: specifying the partition and choosing the simple function defined on the partition. The most common choice for a partition is a uniform partition. The simple function is defined by choosing a constant function value on each resulting subinterval. A Riemann sum requires that we choose the value to match the true function \(f(x)\) at some point within the closed subinterval \([x_{k-1},x_k]\text{.}\) Different rules for how to choose the point define some common methods.

Left-Hand Rule

The simple function uses the value at the left end point, \(f(x_{k-1})\text{.}\)

Right-Hand Rule

The simple function uses the value at the right end point, \(f(x_{k})\text{.}\)

Mid-Point Rule

The simple function uses the value at the midpoint of the interval, \(f(\frac{x_{k-1}+x_{k}}{2})\text{.}\)

Trapezoid Rule

The simple function uses the average of the values at the end-points, \(\displaystyle \frac{f(x_{k-1})+f(x_{k})}{2}\text{.}\)

Lower-Sum Rule

The simple function uses the minimum value of the function on the subinterval, \(\min(f(x) : x \in [x_{k-1},x_k])\text{.}\)

Upper-Sum Rule

The simple function uses the maximum value of the function on the subinterval, \(\max(f(x) : x \in [x_{k-1},x_k])\text{.}\)

The left-hand rule and the right-hand rule are the simplest rules to work with algebraically. We will focus on practicing using those rules. The trapezoid rule typically is a much better approximation and is preferred when using a computer. The lower-sum and upper-sum rules provide error bounds on our approximation. The lower-sum always underestimates the definite integral; the upper-sum always overestimates the value. If we know both the lower-sum and upper-sum, then the true value must be between them.

To compute a Riemann sum using a particular choice of simple function, we usually do not define the approximating simple function separately. We just compute the approximating definite integral based on that simple function. For clarity, our first example will define the function directly.

Example4.3.4

Approximate \(\displaystyle \int_{2}^{5} x^2 dx\) using the left-hand rule with a uniform partition of size \(n=4\text{.}\)

In particular, the partition is defined by the sequence

\begin{equation*}
x = (2, 2.75, 3.5, 4.25, 5).
\end{equation*}

The second step is to define the simple function, \(\mathcal{L}_f(x)\text{.}\) Using the left-hand rule means that we will use the value of \(f(x) = x^2\) on each subinterval \([x_{k-1},x_k]\) by the value of \(f(x_{k-1})\text{.}\)

A graph of \(y=f(x)\) and the approximating simple function \(y=\mathcal{L}_f(x)\) is shown below. The shaded region corresponds to the definite integral represented by the Riemann sum.

The Riemann sum is the definite integral of the approximating simple function. Notice how the limits of the integral correspond to the interval \([2,5]\) while the limits of the sum correspond to counting the subintervals in the partition.

In usual practice, the only steps we really need are identifying the partition, determining the value of the function on each subinterval, and then computing the Riemann sum, which corresponds to the definite integral of the simple function. Writing down the piecewise formula for the simple function is not actually necessary. A table often makes the computation simpler.

Example4.3.5

Use a Riemann sum with the right-hand rule and a uniform partition of size \(n=5\) to approximate \(\displaystyle \int_0^2 \frac{1}{x+1} dx\text{.}\)

Once the partition is identified, calculate the value of the integrand function \(f(x) = \displaystyle \frac{1}{x+1}\) at the right endpoint of each subinterval. The table below summarizes these computations.

\(k\) (index)

\([x_{k-1}, x_k]\) (interval)

\(f(x_k)\) (value)

\(1\)

\([0,0.4]\)

\(f(0.4) = \frac{1}{1.4} \approx 0.7143 \)

\(2\)

\([0.4,0.8]\)

\(f(0.8) = \frac{1}{1.8} \approx 0.5556 \)

\(3\)

\([0.8,1.2]\)

\(f(1.2) = \frac{1}{2.2} \approx 0.4546 \)

\(4\)

\([1.2,1.6]\)

\(f(1.6) = \frac{1}{2.6} \approx 0.3846 \)

\(5\)

\([1.6,2]\)

\(f(2) = \frac{1}{3} \approx 0.3333 \)

Knowing the constant values on each subinterval, if we called the simple function using the right endpoint \(\mathcal{R}_f(x)\text{,}\) then we have the Riemann sum

The graph below shows the original function \(y=f(x)\) and the simple function \(y=\mathcal{R}_f(x)\) that was used in the Riemann sum.

The previous two examples illustrated very specific Riemann sums, where the size of the partition was specified as a small number. In order to compute definite integrals using limits of Riemann sums, we need to find an explicit formula for a Riemann sum involving a partition of unspecified size \(n\text{.}\)

The basic steps for these problems are as follows.

Create a formula for the partition with increment

\begin{equation*}
\Delta x = \frac{b-a}{n}
\end{equation*}

and partition points defined by an arithmetic sequence

\begin{equation*}
x_k = a + k \, \Delta x.
\end{equation*}

Evaluate the integrand function \(f(x)\) at the appropriate choice, usually at an end point such as \(f(x_{k-1})\) (left) or \(f(x_k)\) (right), and expand the formula as necessary.

Write down the Riemann sum using summation notation. Apply the properties of summation and the summation formulas to find an explicit formula for the Riemann sum in terms of \(n\text{.}\) The typical representation of the Riemann sum uses the form

The partition defines the \(k\)th subinterval \([x_{k-1}, x_k]\) such that the right-hand rule will evaluate the integrand \(f(x)=5-2x\) at the point \(x_k\text{,}\)

The Riemann sum is equal to the sum of increments computed as the integrand function (rate) times the partition increment width. That is, if we use the function \(\mathcal{R}_f(x)\) as the simple function using the right-hand end points of the intervals, then the Riemann sum is

Because the graph \(y=f(x)\) (shown below) is linear, we can compute the corresponding signed area using the area of triangles and compare our calculation. The graph crosses the axis when \(f(x)=0\) which occurs at \(x=2.5\text{.}\) So we split the definite integral into two pieces,

The first region on interval \([-1,2.5]\) is a triangle above the axis with height 7 and width 3.5 so that the area of the region is \(\frac{1}{2}(7)(3.5) = 12.25\text{.}\) The second region on interval \([2.5, 5]\) is a triangle below the axis with height 5 (since \(f(5)=-5\)) and base width \(5-2.5=2.5\text{.}\) The area of the second triangle is \(\frac{1}{2}(5)(2.5) = 6.25\) but corresponds to a signed area of \(-6.25\) (because below the axis). So

Thus, the limit of the Riemann sum exactly agrees with the geometric calculation of total signed area.

Subsection4.3.3Summary

The definite integral \(\displaystyle \int_a^b f(x) \, dx\) of a general function \(f(x)\) can be approximated by a Riemann sum, which is the definite integral of a simple function that approximates \(f(x)\) as a piecewise constant function.

A partition of an interval of size \(n\) is a finite sequence of values \(P = (x_0, x_1, \ldots, x_n)\) which defines \(n\) subintervals \(I_k = [x_{k-1},x_k]\text{.}\) The lengths of the subintervals are the increments \(\nabla x_k = x_{k}-x_{k-1}\text{.}\)

A uniform partition of the interval \([a,b]\) of size \(n\) has equal increments \(\displaystyle \nabla x_k = \Delta x = \frac{b-a}{n}\text{.}\) The sequence of points is arithmetic with formula

\begin{equation*}
x_k = a + k \, \Delta x\text{.}
\end{equation*}

A Riemann sum of \(\displaystyle \int_a^b f(x) \, dx\) on a partition \(P\) identifies values in each subinterval, \(x_k^* \in [x_{k-1}, x_k]\text{,}\) uses the values \(f(x_k^*)\) to define a simple function, and computes the integral of the simple function as a simple sum,

Trapezoid Rule: Choose \(x_k^*\) so that \(\displaystyle f(x_k^*) = \frac{f(x_{k-1})+f(x_k)}{2}\) (average height of sides).

Lower-Sum Rule: Choose \(x_k^*\) so that \(f(x_k^*) = \min(f(x): x \in [x_{k-1},x_k]\) (minimum value).

Upper-Sum Rule: Choose \(x_k^*\) so that \(f(x_k^*) = \max(f(x): x \in [x_{k-1},x_k]\) (maximum value).

The definite integral is the limit of all Riemann sums as the partition size grows \(n \to \infty\) and the increments shrink \(\Delta x \to 0\text{.}\) In particular, for a uniform partition,

To approximate a definite integral \(\displaystyle \int_a^b f(x)\,dx\) for a specific size Riemann sum (i.e., for a specific value of \(n\)), we apply the following steps.

Find the specific partition points.

Identify the evaluation points \(x_k^*\) according to the rule being used.

Calculate the specific values of the integrand \(f(x_k^*)\text{.}\)

Add the increments of the Riemann sum, multiplying each rate value \(f(x_k^*)\) by the increment \(\nabla x_k\text{,}\)
\begin{equation*}
\sum_{k=1}^{n} f(x_k^*) \, \nabla x_k.
\end{equation*}

To express a definite integral \(\displaystyle \int_a^b f(x)\,dx\) as the limit of uniform Riemann sums, we apply the following steps.

Calculate the uniform increment \(\Delta x = \frac{b-a}{n}\text{.}\)

Find and simplify the explicit formula for the partition points
\begin{equation*}
x_k = a+k \, \Delta x\text{.}
\end{equation*}

Compute \(f(x_k^*)\text{,}\) usually using \(x_k^*=x_k\) (right-hand rule), using function substitution (composition).

Write down the limit of the Riemann sum, remembering to multiply the rate value \(f(x_k^*)\) by \(\Delta x\text{,}\)
\begin{equation*}
\int_a^b f(x)\, dx = \lim_{n \to \infty} \sum_{k=1}^{n} f(x_k^*) \Delta x.
\end{equation*}

To compute the value of the definite integral using the limit of Riemann sums, we first compute the formula for the Riemann sum in terms of \(n\text{,}\)