Riemann integration measures area by refining partitions of the domain. Darboux sums expose the exact criterion for when upper and lower approximations meet.
Upper and lower Darboux sums
The Riemann integral exists when all sufficiently fine upper and lower step approximations agree.
Definition. For a bounded \(f:[a,b]\to\mathbb R\) and partition \(P\), define \(U(f,P)=\sum_i M_i\Delta x_i\) and \(L(f,P)=\sum_i m_i\Delta x_i\), where \(M_i=\sup_{[x_{i-1},x_i]}f\) and \(m_i=\inf_{[x_{i-1},x_i]}f\).
Lemma (refinement monotonicity). If \(P'\) refines \(P\), then \[ L(f,P)\le L(f,P')\le U(f,P')\le U(f,P). \] For any two partitions \(P,Q\), \(L(f,P)\le U(f,Q)\).
Proof. Adding one partition point splits an interval into two. Each new supremum is at most the old supremum and each new infimum at least the old infimum, proving the first chain by iteration. The common refinement \(P\cup Q\) gives \[ L(f,P)\le L(f,P\cup Q)\le U(f,P\cup Q)\le U(f,Q). \]
Theorem. \(f\) is Riemann integrable if and only if for every \(\varepsilon>0\) there is a partition \(P\) with \(U(f,P)-L(f,P)\lt \varepsilon\).
Proof. Define \[ \overline{\int_a^b}f=\inf_PU(f,P),\qquad \underline{\int_a^b}f=\sup_PL(f,P). \] The lemma gives lower integral \(\le\) upper integral. If \(U(f,P)-L(f,P)<\varepsilon\), then \[ 0\le\overline{\int}f-\underline{\int}f \le U(f,P)-L(f,P)<\varepsilon, \] so the two integrals agree. Conversely, if they agree at \(I\), choose \(P_1,P_2\) with \(U(f,P_1)<I+\varepsilon/2\) and \(L(f,P_2)>I-\varepsilon/2\). Their common refinement \(P=P_1\cup P_2\) satisfies \(U(f,P)-L(f,P)<\varepsilon\).
Theorem (tagged-sum criterion). A bounded \(f\) is Riemann integrable with integral \(I\) if and only if for every \(\varepsilon>0\) there is \(\delta>0\) such that every tagged partition \((P,\xi)\) with mesh \(\|P\|<\delta\) satisfies \[ \left|\sum_i f(\xi_i)\Delta x_i-I\right|<\varepsilon. \]
Proof outline. If a partition \(P_0\) has small Darboux gap, then any sufficiently fine tagged partition can cross only finitely many points of \(P_0\). The contribution of crossing intervals is bounded by \(2\|f\|_\infty\) times their total length, while on all remaining intervals the tagged sum is squeezed between the corresponding lower and upper sums. Conversely, if every fine tagged sum is close to \(I\), choose on each interval tags approaching its supremum and infimum. The resulting upper and lower sums must be close, so the Darboux criterion applies.
Continuous functions are integrable
Uniform continuity on a compact interval controls oscillation on small subintervals.
Theorem. Every continuous function on \([a,b]\) is Riemann integrable.
Proof. By uniform continuity, choose \(\delta\) so that \(|x-y|\lt \delta\Rightarrow |f(x)-f(y)|\lt \varepsilon/(b-a)\). For any partition with mesh below \(\delta\), the oscillation on each subinterval is below \(\varepsilon/(b-a)\), hence \(U(f,P)-L(f,P)\lt \varepsilon\).
Lebesgue criterion for Riemann integrability
Riemann integrability is exactly continuity except on a null set.
Theorem. A bounded function on \([a,b]\) is Riemann integrable if and only if its set of discontinuities has Lebesgue measure zero.
Proof. Define the oscillation \[ \omega_f(x)=\inf_{r>0}\sup\{|f(s)-f(t)|:s,t\in[a,b]\cap B(x,r)\}. \] Then \(f\) is continuous at \(x\) exactly when \(\omega_f(x)=0\), and \(D_m=\{\omega_f\ge1/m\}\) is closed. Thus the discontinuity set is \(D=\bigcup_mD_m\).
Suppose \(f\) is integrable. Choose \(P\) with Darboux gap \(<\varepsilon/m\). Apart from finitely many partition endpoints, every point of \(D_m\) lies in a partition interval whose oscillation is at least \(1/m\). The total length of those intervals is at most \[ m\sum_i(M_i-m_i)\Delta x_i<m(\varepsilon/m)=\varepsilon. \] Small neighborhoods of the finitely many endpoints add arbitrarily little length. Hence each \(D_m\), and therefore \(D\), is null.
Conversely, suppose \(D\) is null and \(|f|\le M\). For a prescribed \(\varepsilon\), choose \(m\) so that \((b-a)/m<\varepsilon/2\). Cover compact \(D_m\) by finitely many open intervals of total length \(<\varepsilon/(8M)\). On the compact complement, every point has a neighborhood on which the oscillation is \(<1/m\); a finite subcover gives a partition fine enough that intervals not meeting the exceptional cover have oscillation \(<1/m\). Exceptional intervals contribute at most \(2M\) times total length, while the others contribute at most \((b-a)/m\). The Darboux gap is \(<\varepsilon\).
Example (Dirichlet and Thomae functions). The indicator \(\mathbf1_{\mathbb Q}\) is discontinuous everywhere, hence not Riemann integrable. Thomae's function \[ t(x)= \begin{cases} 1/q,&x=p/q\text{ in lowest terms},\\ 0,&x\notin\mathbb Q, \end{cases} \] is continuous at every irrational and discontinuous at every rational. Its discontinuity set is countable, so it is Riemann integrable with integral \(0\).
Algebra and order
Integrable functions form a stable ordered vector space.
Proposition. If \(f,g\) are Riemann integrable, then \(af+bg\), \(fg\), \(|f|\), \(\max(f,g)\), and \(\min(f,g)\) are Riemann integrable.
Proof. The discontinuities of these combinations are contained in the union of the discontinuity sets of \(f\) and \(g\), except for operations involving continuous maps on \(\mathbb R^2\). Since finite unions of null sets are null, the Lebesgue criterion applies.
Relation to Lebesgue integration
The Riemann integral is a special case of the Lebesgue integral.
Theorem. If \(f\) is Riemann integrable on \([a,b]\), then \(f\) is Lebesgue integrable and the two integrals agree.
Proof. By the Lebesgue criterion, \(f\) is continuous almost everywhere and therefore Lebesgue measurable; boundedness on a finite interval makes it integrable. For each partition choose lower and upper step functions \(\ell_P\le f\le u_P\) whose integrals are \(L(f,P)\) and \(U(f,P)\). Given \(\varepsilon>0\), choose \(P\) with \(\int(u_P-\ell_P)<\varepsilon\). Then \[ L(f,P)\le\int_a^b f\,\mathrm{d}x\le U(f,P), \] and both endpoints can be made arbitrarily close to the Riemann integral. Hence the two integrals agree.