Tutorials › Calculus I › Continuous Functions Are Riemann Integrable

Riemann Sums and the Integral · Tutorial 950 of 1495

Continuous Functions Are Riemann Integrable

See how uniform continuity controls the oscillation on each partition interval and forces the upper and lower sums to converge together.

Intermediate 10 min read

What You'll Learn

  • State the conditions under which continuity guarantees Riemann integrability.
  • Explain how uniform continuity controls function oscillation on short intervals.
  • Bound the difference between upper and lower Darboux sums.
  • Compute that difference for uniform partitions in concrete examples.
  • Identify and correct a common error when calculating Darboux-sum gaps.

Why Continuity Helps with Integration

A definite integral can be understood through approximations by rectangles. For a function on a closed interval, the lower rectangles lie below the function and the upper rectangles lie above it. If the gap between the corresponding sums can be made arbitrarily small, these approximations determine one common integral value.

Continuity supplies the key control: when two inputs are close, their function values are close. On a closed bounded interval, this control is uniform, so one can choose a single partition fine enough to work across the entire interval. That is why continuity on a closed interval guarantees Riemann integrability.

Upper and Lower Darboux Sums

Let \(f:[a,b]\to\mathbb{R}\) be bounded, with \(a<b\), and let \(P=\{x_0,x_1,\ldots,x_n\}\) be a partition, where \(a=x_0<x_1<\cdots<x_n=b\). On each subinterval \([x_{i-1},x_i]\), define \(M_i\) to be the supremum of \(f\) and \(m_i\) to be its infimum. The upper and lower Darboux sums are:

$$ U(f,P)=\sum_{i=1}^{n} M_i(x_i-x_{i-1}), \qquad L(f,P)=\sum_{i=1}^{n} m_i(x_i-x_{i-1}). $$

The gap between these sums has a useful form. Each interval contributes its width multiplied by the difference between the function's supremum and infimum there:

$$ U(f,P)-L(f,P) = \sum_{i=1}^{n}(M_i-m_i)(x_i-x_{i-1}). $$

The quantity \(M_i-m_i\) measures the oscillation of \(f\) on that subinterval. A small width alone is not enough to guarantee a small gap: the oscillation must also be controlled.

Riemann integrability criterion: A bounded function \(f:[a,b]\to\mathbb{R}\) is Riemann integrable if and only if, for every \(\varepsilon>0\), there is a partition \(P\) such that \(U(f,P)-L(f,P)<\varepsilon\).

Uniform Continuity on a Closed Interval

Definition: A function \(f:[a,b]\to\mathbb{R}\) is uniformly continuous if, for every \(\eta>0\), there exists \(\delta>0\) such that for all \(x,y\in[a,b]\), \(|x-y|<\delta\) implies \(|f(x)-f(y)|<\eta\). The same \(\delta\) must work for every pair \(x,y\) in the interval.

Uniform continuity differs from continuity at each individual point in an important way. Ordinary continuity allows the required input distance to depend on the point. Uniform continuity provides one distance that works everywhere on the domain.

Theorem (Heine–Cantor): Every continuous real-valued function on a closed bounded interval \([a,b]\) is uniformly continuous. Also, by the Extreme Value Theorem, it is bounded and attains a maximum and minimum on that interval.

These theorems apply because \([a,b]\) is a closed bounded interval. One way to see why the uniform-continuity conclusion follows is to use compactness. Given \(\eta>0\), continuity at each point \(c\) supplies a radius \(r_c>0\) such that inputs within \(r_c\) of \(c\) have function values within \(\eta/2\) of \(f(c)\). The intervals of radius \(r_c/2\) around these points cover \([a,b]\). Compactness gives a finite subcover. Choose \(\delta\) to be the smallest of the finitely many radii \(r_c/2\). If \(x,y\in[a,b]\) and \(|x-y|<\delta\), choose one covering interval containing \(x\), centered at some \(c\). Then both \(x\) and \(y\) are within \(r_c\) of \(c\), so \(|f(x)-f(y)|<\eta\) by the triangle inequality. This gives one suitable \(\delta\) for the whole interval.

Why Continuity Implies Integrability

We can now prove the main result by controlling every term in the upper-minus-lower-sum formula.

Theorem: If \(f:[a,b]\to\mathbb{R}\) is continuous and \(a<b\), then \(f\) is Riemann integrable on \([a,b]\).
1
Choose a target gap.
Let \(\varepsilon>0\) be given. By the Heine–Cantor theorem, \(f\) is uniformly continuous. Use uniform continuity with \(\eta=\varepsilon/(2(b-a))\), which is positive because \(b-a>0\), to obtain \(\delta>0\).
2
Choose a sufficiently fine partition.
Take a uniform partition with \(n\) subintervals, where \(n\) is an integer large enough that \((b-a)/n<\delta\). Such an integer exists. Each subinterval has width \((b-a)/n\).
3
Bound each oscillation.
Any two points \(x,y\) in the same subinterval satisfy \(|x-y|\le (b-a)/n<\delta\), so \(|f(x)-f(y)|<\eta\). It follows that the supremum minus the infimum on that subinterval is at most \(\eta\).
4
Bound the total gap.
The widths of all subintervals sum to \(b-a\). Therefore the upper-minus-lower-sum gap is at most \(\eta(b-a)=\varepsilon/2<\varepsilon\).

For completeness, if \(M_i\) and \(m_i\) are the supremum and infimum on the \(i\)th subinterval of this partition, the estimate is:

$$ U(f,P)-L(f,P) =\sum_{i=1}^{n}(M_i-m_i)(x_i-x_{i-1}) \leq \eta\sum_{i=1}^{n}(x_i-x_{i-1}) =\eta(b-a) =\frac{\varepsilon}{2} <\varepsilon. $$

The Darboux integrability criterion now applies: for every positive \(\varepsilon\), a partition makes the upper and lower sums differ by less than \(\varepsilon\). Hence \(f\) is Riemann integrable.

Worked Examples

Worked Example: The Square Function on a Uniform Partition

Let \(f(x)=x^2\) on \([0,1]\), and divide the interval into \(n\) equal parts. The \(i\)th part is \([(i-1)/n,i/n]\), of width \(1/n\). Since \(x^2\) increases on \([0,1]\), the infimum and supremum there are \(m_i=((i-1)/n)^2\) and \(M_i=(i/n)^2\).

Thus the gap is:

$$ \begin{aligned} U(f,P)-L(f,P) &=\sum_{i=1}^{n}\left(\frac{i^2-(i-1)^2}{n^2}\right)\frac{1}{n}\\ &=\frac{1}{n^3}\sum_{i=1}^{n}(2i-1)\\ &=\frac{n^2}{n^3} =\frac{1}{n}. \end{aligned} $$

For \(n=4\), the exact gap is \(1/4\). For \(n=101\), it is \(1/101<1/100\), so the gap is less than \(0.01\). The result is checked directly by the formula \(U-L=1/n\), which gives \(1/101\) at \(n=101\).

Worked Example: The Square-Root Function

Let \(f(x)=\sqrt{x}\) on \([0,1]\). This function is continuous, including at \(0\), though its slope is not bounded near \(0\). For nonnegative \(x,y\), assume \(x\geq y\). Then:

$$ |\sqrt{x}-\sqrt{y}|^2 =(\sqrt{x}-\sqrt{y})^2 \leq (\sqrt{x}-\sqrt{y})(\sqrt{x}+\sqrt{y}) =x-y =|x-y|. $$

Thus \(|\sqrt{x}-\sqrt{y}|\leq\sqrt{|x-y|}\); the same inequality holds if \(y\geq x\), by interchanging the variables. Given \(\eta>0\), choosing \(\delta=\eta^2\) makes \(|x-y|<\delta\) imply \(|f(x)-f(y)|<\eta\), explicitly showing uniform continuity.

On the uniform partition into \(n\) parts, the function increases, so the \(i\)th oscillation is \(\sqrt{i/n}-\sqrt{(i-1)/n}\). Therefore:

$$ \begin{aligned} U(f,P)-L(f,P) &=\frac{1}{n}\sum_{i=1}^{n} \left(\sqrt{\frac{i}{n}}-\sqrt{\frac{i-1}{n}}\right)\\ &=\frac{1}{n}(1-0) =\frac{1}{n}. \end{aligned} $$

For \(n=20\), the gap is exactly \(1/20=0.05\). Substituting \(n=20\) into the formula confirms that the upper and lower sums differ by \(0.05\).

Worked Example: A Quantitative Bound for Sine

Let \(f(x)=\sin x\) on \([0,\pi/2]\). The Mean Value Theorem applies because sine is continuous on this closed interval and differentiable in its interior. Since \(|\cos t|\leq1\), it gives \(|\sin x-\sin y|\leq|x-y|\) for any \(x,y\) in the interval.

Divide the interval into \(n\) equal parts. Each width is \(\pi/(2n)\), and the oscillation on each part is at most \(\pi/(2n)\). Consequently:

$$ U(f,P)-L(f,P) \leq n\left(\frac{\pi}{2n}\right)^2 =\frac{\pi^2}{4n}. $$

For \(n=100\), this is less than \(16/400=0.04<0.1\), using \(\pi<4\). Thus the gap is less than \(0.1\). The calculation is checked by adding the bound for all 100 intervals: each contributes at most \((\pi/(200))(\pi/200)\), giving \(100\pi^2/40000=\pi^2/400<0.04\).

A Common Mistake: Leaving Out the Width

In the square-function example with \(n=4\), the oscillations on the four subintervals are \(1/16\), \(3/16\), \(5/16\), and \(7/16\). Their sum is \(1\). But this is not the difference \(U-L\): each oscillation must be multiplied by its subinterval width, \(1/4\). The correct gap is:

$$ U(f,P)-L(f,P) =\frac14\left(\frac{1}{16}+\frac{3}{16}+\frac{5}{16}+\frac{7}{16}\right) =\frac14. $$

Omitting the widths gives \(1\), four times the correct answer. In any partition, the oscillation measures a vertical difference in function values; multiplying by the interval width gives that interval's contribution to the Darboux-sum gap.

Why the Closed-Interval Condition Matters

The theorem requires continuity on a closed bounded interval. Those conditions ensure both boundedness and uniform continuity, which are the ingredients used in the proof. Continuity on an open interval does not by itself give the same guarantees. For instance, \(f(x)=1/x\) is continuous on \((0,1]\) but is unbounded there, so it does not have a proper Riemann integral over \([0,1]\) as a bounded function.

The main mechanism is not that every small subinterval has a small function value. Rather, uniform continuity ensures that the function's values vary little within every sufficiently short subinterval. The widths then add to the fixed total length \(b-a\), forcing the complete upper-lower gap to be small.

Check Your Understanding

Use the definitions and estimates in this tutorial to answer the following questions.

  1. What does uniform continuity require that ordinary pointwise continuity does not?
  2. Why does the proof choose \(\eta=\varepsilon/(2(b-a))\) rather than simply \(\eta=\varepsilon\)?
  3. For \(f(x)=x^2\) on \([0,1]\), what is the upper-lower gap for a uniform partition into \(n\) parts?
  4. In the sine example, why does the Mean Value Theorem give \(|\sin x-\sin y|\leq|x-y|\)?
  5. In the formula for \(U(f,P)-L(f,P)\), what does each interval's width multiply?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon