Squeezing from both sides
Last guide left us with two families of numbers — lower sums below, upper sums above — never crossing. The natural move is to push each family as far as it will go. Define the lower integral as the supremum of all lower sums and the upper integral as the infimum of all upper sums:
lower integral = sup over all partitions P of L(f, P) upper integral = inf over all partitions P of U(f, P) Because every lower sum <= every upper sum (previous guide): lower integral <= upper integral ALWAYS, for any bounded f. There is a permanent gap unless they happen to meet.
These two numbers always exist for a bounded f — that is guaranteed by completeness of the reals (every bounded set has a sup and an inf). We say f is Riemann integrable on [a,b] exactly when the lower integral equals the upper integral. Their common value is the integral ∫ from a to b of f. If they differ, no single number deserves to be called “the area,” and we refuse to integrate f.
The Riemann criterion
Comparing two suprema/infima is awkward in practice. The Riemann criterion turns integrability into a single, checkable inequality and is a true necessary and sufficient condition: f is integrable on [a,b] if and only if for every ε > 0 there exists a partition P with U(f,P) − L(f,P) < ε. One partition that closes the gap below ε — that is all you ever need to exhibit.
Claim: f integrable <=> for all ε>0 there is a partition P with U(f,P) - L(f,P) < ε.
(=>) Suppose f integrable, common value I. By definition of sup and inf,
pick P1 with L(f,P1) > I - ε/2 and P2 with U(f,P2) < I + ε/2.
Let P = P1 ∪ P2 (common refinement). Refinement keeps L up and U down, so
L(f,P) >= L(f,P1) > I - ε/2 , U(f,P) <= U(f,P2) < I + ε/2.
Subtract: U(f,P) - L(f,P) < (I+ε/2) - (I-ε/2) = ε. done.
(<=) Suppose for each ε>0 some P has U(f,P) - L(f,P) < ε. Always
L(f,P) <= lower integral <= upper integral <= U(f,P),
so 0 <= upper integral - lower integral <= U(f,P) - L(f,P) < ε.
A non-negative number smaller than EVERY ε must be 0.
Hence upper integral = lower integral, i.e. f is integrable. done.A function that fails
To feel why the criterion has teeth, look at Dirichlet's function: f(x) = 1 if x is rational, 0 if irrational, on [0,1]. On any subinterval, no matter how tiny, there are both rationals and irrationals, so M_k = 1 and m_k = 0 for every k. Hence U(f,P) = 1 and L(f,P) = 0 for every partition P. The gap is stuck at 1; the upper integral is 1, the lower is 0, and they never meet. This f is not Riemann integrable.