Real AnalysisThe Riemann Integral

Limits of Sums as Integrals

Because continuous functions are integrable, every Riemann sum tends to the integral; so a limit like (1/n)∑f(k/n) is ∫₀¹ f(x) dx.

Not started Jump to practice

The integral of a continuous function is the limit of any Riemann sums whose pieces shrink, because the sums are squeezed between lower and upper sums whose gap goes to $0$ (the integral is well defined). Read backward, this turns certain limits of sums into integrals you can evaluate with the fundamental theorem.

Key idea

If $f$ is continuous on $[0, 1]$, then $$\lim_{n \to \infty} \frac{1}{n}\sum_{k=1}^{n} f\left(\frac{k}{n}\right) = \int_0^1 f(x)\,dx.$$ To use it, rewrite each term as $f\left(\frac{k}{n}\right)\cdot\frac{1}{n}$: the sample point is $\frac{k}{n}$ and the width is $\frac{1}{n}$.

Why it works

The points $\frac{k}{n}$ cut $[0, 1]$ into $n$ pieces of width $\frac{1}{n}$, and $f\left(\frac{k}{n}\right)$ is the value at the right end of the $k$th piece. So the sum is a Riemann sum, and it lies between $L(f, P_n)$ and $U(f, P_n)$. Since $f$ is continuous, it is integrable, so $U - L \to 0$ and both tend to $\int_0^1 f$. The sum is squeezed to the same value. The same idea works on other intervals: $\sum_{k=1}^{2n} \frac{1}{n} f\left(\frac{k}{n}\right) \to \int_0^2 f$.
Right-endpoint sums for $\frac{1}{1 + x^{2}}$ on $[0, 1]$ approach $\frac{\pi}{4}$: they are exactly the sums $\sum \frac{n}{n^{2} + k^{2}}$.

The recognition step is the whole skill. Look for a factor $\frac{1}{n}$ (or something that becomes one after dividing top and bottom by a power of $n$), and for $k$ appearing only through $\frac{k}{n}$. Then the function is whatever is applied to $\frac{k}{n}$, and the interval runs from where $\frac{k}{n}$ starts to where it ends. A constant factor in front of the sum just multiplies the integral.

Worked examples

Worked example: A sum that becomes $\frac{\pi}{4}$

Find $\lim \sum_{k=1}^{n} \frac{n}{n^{2} + k^{2}}$.
  1. Divide top and bottom by $n^{2}$: $\frac{n}{n^{2} + k^{2}} = \frac{1}{1 + (k/n)^{2}}\cdot\frac{1}{n}$.
  2. So the sum is a Riemann sum for $f(x) = \frac{1}{1 + x^{2}}$ on $[0, 1]$.

Answer: $\int_0^1 \frac{dx}{1 + x^{2}} = \arctan 1 = \frac{\pi}{4}$.

Worked example: A logarithm from a sum

Find $\lim \sum_{k=1}^{n} \frac{1}{n + k}$.
  1. $\frac{1}{n + k} = \frac{1}{1 + k/n}\cdot\frac{1}{n}$.

Answer: $\int_0^1 \frac{dx}{1 + x} = \ln 2$.

Worked example: Powers

Find $\lim \frac{1}{n}\sum_{k=1}^{n} \left(\frac{k}{n}\right)^{3}$.
  1. This is a Riemann sum for $x^{3}$ on $[0, 1]$.

Answer: $\int_0^1 x^{3}\,dx = \frac{1}{4}$ (compare $\sum_{k=1}^{n} k^{3} = \frac{n^{2}(n + 1)^{2}}{4}$, which gives the same limit).

Common mistake

Losing the width or the interval. Every term must be written as $f(\text{point})\cdot\frac{1}{n}$; a sum like $\sum \frac{k}{n^{2}}$ hides the $\frac{1}{n}$ inside $\frac{k}{n}\cdot\frac{1}{n}$. And count the terms: $k$ from $1$ to $2n$ with width $\frac{1}{n}$ covers $[0, 2]$, not $[0, 1]$, so $\sum_{k=1}^{2n} \frac{1}{n + k} \to \ln 3$.
These limits are a two-way street. Numerical methods use them forward: a Riemann sum with large $n$ approximates an integral. Analysis uses them backward: a limit of sums that looks hopeless by algebra is recognized as an integral and evaluated exactly.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

This is one of the top rungs of Real Analysis.

Sources and further reading

  • Jiří Lebl, Basic Analysis I: Introduction to Real Analysis, section 5.1 (Riemann sums and the integral)
  • MIT OpenCourseWare 18.100A Real Analysis, lecture notes on Riemann sums
@teddyrookbook GitHub