Kahibaro
Discord Login Register

Riemann sums

Riemann sums are a systematic way to approximate a definite integral by adding up areas of simple shapes—usually rectangles—under (or above) the graph of a function. In this chapter, we focus on how Riemann sums are built, the main types of Riemann sums, and how they connect conceptually and symbolically to definite integrals.

We will always assume that $f$ is a real-valued function defined on a closed interval $[a,b]$.

Partitions of an interval

To form a Riemann sum over $[a,b]$, we first break the interval into smaller subintervals.

A partition $P$ of $[a,b]$ is a finite set of points
$$
P:\quad a = x_0 < x_1 < x_2 < \dots < x_{n-1} < x_n = b.
$$

These points divide $[a,b]$ into $n$ subintervals:
$$
[x_0,x_1],\ [x_1,x_2],\ \dots,\ [x_{n-1},x_n].
$$

The length (or width) of the $i$th subinterval is
$$
\Delta x_i = x_i - x_{i-1}, \quad i = 1,2,\dots,n.
$$

The norm (or mesh size) of the partition $P$ is
$$
\|P\| = \max_{1 \le i \le n} \Delta x_i.
$$

Conceptually, $\|P\|$ measures the size of the largest subinterval; as we refine the partition (use more and smaller subintervals), $\|P\|$ gets smaller.

A common special case is a uniform partition, where all subintervals have equal length:
$$
\Delta x_1 = \Delta x_2 = \dots = \Delta x_n = \Delta x = \frac{b-a}{n},
$$
and the partition points are
$$
x_i = a + i\Delta x, \quad i = 0,1,\dots,n.
$$

Uniform partitions make formulas and computations much simpler, and are standard in examples.

Sample points

Once we have a partition, we choose a point inside each subinterval to sample the function. These are called sample points.

For each subinterval $[x_{i-1},x_i]$, choose a point
$$
c_i \in [x_{i-1}, x_i], \quad i = 1,2,\dots,n.
$$

The value $f(c_i)$ will be used as the “height” of a rectangle over the $i$th subinterval. Different rules for picking $c_i$ lead to different kinds of Riemann sums (left, right, midpoint, etc.).

In symbols, a tagged partition is a partition together with a choice of sample point in each subinterval:
$$
\{( [x_{i-1},x_i], c_i )\}_{i=1}^n.
$$

General Riemann sum

Given

the corresponding Riemann sum of $f$ on $[a,b]$ is
$$
S(f,P,\{c_i\}) = \sum_{i=1}^n f(c_i)\,\Delta x_i
= \sum_{i=1}^n f(c_i)\,(x_i - x_{i-1}).
$$

Geometrically, this sum adds the areas of rectangles:

If $f(c_i) \ge 0$, the rectangle lies above the $x$-axis; if $f(c_i) < 0$, the rectangle lies below the $x$-axis, contributing a negative amount. Thus, Riemann sums approximate the signed area under the graph of $y=f(x)$ over $[a,b]$.

In the frequently used uniform case with $\Delta x = \dfrac{b-a}{n}$ and $x_i = a + i\Delta x$, the general Riemann sum becomes
$$
S = \sum_{i=1}^n f(c_i)\,\Delta x,\quad
\text{with } c_i \in [x_{i-1},x_i].
$$

Types of Riemann sums (choice of sample points)

The general definition allows any choice of sample points in each subinterval. In practice, several standard choices are especially common.

Throughout this section, assume a uniform partition, so that
$$
\Delta x = \frac{b-a}{n},\quad x_i = a + i\Delta x.
$$

Left Riemann sum

For the left Riemann sum, the sample point in each subinterval is the left endpoint:
$$
c_i = x_{i-1},\quad i=1,\dots,n.
$$

The left Riemann sum is
$$
L_n = \sum_{i=1}^n f(x_{i-1})\,\Delta x.
$$

Equivalently, using $x_{i-1} = a + (i-1)\Delta x$,
$$
L_n = \sum_{i=1}^n f\big(a + (i-1)\Delta x\big)\,\Delta x.
$$

Interpretation: for each subinterval, we construct a rectangle whose height is the function value at the left end of the interval.

Right Riemann sum

For the right Riemann sum, the sample point in each subinterval is the right endpoint:
$$
c_i = x_i,\quad i=1,\dots,n.
$$

The right Riemann sum is
$$
R_n = \sum_{i=1}^n f(x_i)\,\Delta x
= \sum_{i=1}^n f\big(a + i\Delta x\big)\,\Delta x.
$$

Here, each rectangle takes its height from the right end of the subinterval.

Midpoint Riemann sum

For the midpoint Riemann sum, the sample point is the midpoint of each subinterval:
$$
c_i = \frac{x_{i-1} + x_i}{2}.
$$

In the uniform case,
$$
c_i = a + \left(i - \frac{1}{2}\right)\Delta x.
$$

The midpoint Riemann sum is
$$
M_n = \sum_{i=1}^n f\left(\frac{x_{i-1} + x_i}{2}\right)\Delta x
= \sum_{i=1}^n f\!\left(a + \left(i-\frac{1}{2}\right)\Delta x\right)\Delta x.
$$

Midpoint sums often give better approximations than left or right sums for the same number of subintervals, especially when $f$ is reasonably smooth.

Other choices: upper and lower sums

For a bounded function $f$ on $[a,b]$, we can also define special Riemann sums based on maximum and minimum values on each subinterval.

On each $[x_{i-1},x_i]$:

The upper sum $U(f,P)$ and lower sum $L(f,P)$ with respect to the partition $P$ are
$$
U(f,P) = \sum_{i=1}^n M_i\,\Delta x_i,\qquad
L(f,P) = \sum_{i=1}^n m_i\,\Delta x_i.
$$

These are special Riemann sums where the heights are, respectively, the largest and smallest values of $f$ on each subinterval. They play a key role in a more rigorous (Dar\-boux) approach to integration, but the basic computational idea remains: approximate area by rectangles.

Notation and connection to the definite integral

The definite integral $\displaystyle \int_a^b f(x)\,dx$ is defined (in the Riemann sense) as the limit of Riemann sums as the partition gets finer and finer, provided this limit exists and is independent of how we choose the sample points.

Symbolically, for a uniform partition with $\Delta x = \dfrac{b-a}{n}$ and some choice of $c_i \in [x_{i-1},x_i]$, we often write
$$
\int_a^b f(x)\,dx
= \lim_{n \to \infty} \sum_{i=1}^n f(c_i)\,\Delta x,
$$
when this limit exists and is the same for all valid choices of $c_i$.

In more general (non-uniform) terms, one can express the idea as:
$$
\int_a^b f(x)\,dx
= \lim_{\|P\| \to 0} \sum_{i=1}^n f(c_i)\,\Delta x_i,
$$
where the limit is taken as the norm $\|P\|$ of the partition tends to $0$ and the choice of $c_i \in [x_{i-1},x_i]$ is arbitrary.

The key conceptual link:

The integral sign $\int$ together with $dx$ compactly encodes this limiting process over Riemann sums.

Expressing integrals as Riemann sum limits

Being able to recognize an expression as a Riemann sum, and rewrite it as a definite integral (or vice versa), is a fundamental skill.

A typical Riemann-sum expression for $f$ on $[a,b]$ has the form
$$
\lim_{n \to \infty} \sum_{i=1}^n f(x_i^*)\,\Delta x,
$$
where

In such a case, when the limit exists, we interpret
$$
\lim_{n \to \infty} \sum_{i=1}^n f(x_i^*)\,\Delta x
= \int_a^b f(x)\,dx.
$$

Conversely, starting from $\displaystyle \int_a^b f(x)\,dx$, a standard Riemann-sum approximation with $n$ subintervals is
$$
\sum_{i=1}^n f\big(a + i\Delta x\big)\,\Delta x
\quad\text{or}\quad
\sum_{i=1}^n f\big(a + (i-1)\Delta x\big)\,\Delta x
\quad\text{or}\quad
\sum_{i=1}^n f\!\left(a + \left(i-\frac{1}{2}\right)\Delta x\right)\Delta x,
$$
depending on whether we use right, left, or midpoint sums.

The structure to look for is:

Once you identify $a$, $b$, and $f$, you can rewrite the expression as $\displaystyle \int_a^b f(x)\,dx$.

Approximation and error (informal view)

In practice, we often use Riemann sums with a finite $n$ to approximate a definite integral numerically. Key ideas, without detailed error formulas:

One common strategy is to approximate
$$
\int_a^b f(x)\,dx \approx S_n
$$
for some chosen Riemann sum $S_n$, and increase $n$ until successive approximations change very little.

A more precise analysis of error requires additional tools and is treated elsewhere; here the focus is on the Riemann sum construction itself.

Summary of key formulas

Let $f$ be defined on $[a,b]$, and let $n$ be a positive integer. For a uniform partition:

These formulas encapsulate the Riemann-sum approach to definite integrals: approximate a complicated area by many simple rectangles, then let the number of rectangles grow without bound.

Views: 10

Comments

Please login to add a comment.

Don't have an account? Register now!