[proofplan]
The proof chains two results: the [Heine-Cantor theorem](/theorems/280) upgrades continuity on $[a,b]$ to uniform continuity, and then uniform continuity provides oscillation control on fine partitions. The $\varepsilon$-$\delta$ guarantee of uniform continuity bounds the oscillation of $f$ on each subinterval by $\varepsilon/(b-a)$, and summing these oscillations telescopes to $\varepsilon$, satisfying the [Riemann criterion](/theorems/281).
[/proofplan]
[step:Apply the Heine-Cantor theorem to upgrade continuity to uniform continuity]
Since $f$ is continuous on the closed, bounded interval $[a,b]$, the [Heine-Cantor theorem](/theorems/280) guarantees that $f$ is uniformly continuous on $[a,b]$. Fix $\varepsilon > 0$. By uniform continuity, there exists $\delta > 0$ such that for all $x, y \in [a,b]$,
\begin{align*}
|x - y| < \delta \implies |f(x) - f(y)| < \frac{\varepsilon}{b - a}.
\end{align*}
[/step]
[step:Bound the oscillation of $f$ on each subinterval of a fine partition]
Let $P = \{a_0, a_1, \ldots, a_m\}$ be any partition of $[a,b]$ with mesh $\|P\| := \max_j(a_{j+1} - a_j) < \delta$. On each subinterval $[a_j, a_{j+1}]$, any two points $x, y$ satisfy $|x - y| \leq a_{j+1} - a_j < \delta$, so $|f(x) - f(y)| < \varepsilon/(b-a)$. Taking the supremum over $x$ and the infimum over $y$:
\begin{align*}
\sup_{[a_j, a_{j+1}]} f - \inf_{[a_j, a_{j+1}]} f \leq \frac{\varepsilon}{b - a}.
\end{align*}
[guided]
We need to control the oscillation $M_j - m_j$ on each subinterval, where $M_j = \sup_{[a_j, a_{j+1}]} f$ and $m_j = \inf_{[a_j, a_{j+1}]} f$. The partition $P$ has mesh $\|P\| < \delta$, so on each subinterval $[a_j, a_{j+1}]$, any two points $x, y$ satisfy $|x - y| \leq a_{j+1} - a_j < \delta$.
By the uniform continuity established in the previous step (with the specific choice $\varepsilon/(b-a)$ as the tolerance), any two such points satisfy $|f(x) - f(y)| < \varepsilon/(b-a)$.
How do we pass from this pointwise bound to a bound on $M_j - m_j$? The supremum and infimum are not necessarily attained, so we approximate them. For any $\eta > 0$, by the definition of supremum and infimum, there exist points $x', y' \in [a_j, a_{j+1}]$ with $f(x') > M_j - \eta$ and $f(y') < m_j + \eta$.
Since $x', y' \in [a_j, a_{j+1}]$, the uniform continuity bound gives $f(x') - f(y') \leq |f(x') - f(y')| < \varepsilon/(b-a)$. On the other hand, $f(x') - f(y') > (M_j - \eta) - (m_j + \eta) = M_j - m_j - 2\eta$. Combining: $M_j - m_j - 2\eta < \varepsilon/(b-a)$.
Since $\eta > 0$ was arbitrary, taking $\eta \to 0$ gives $M_j - m_j \leq \varepsilon/(b-a)$. This is the oscillation bound we need for the summation step.
[/guided]
[/step]
[step:Sum the oscillation bounds to verify the Riemann criterion]
Using the oscillation bound from the previous step:
\begin{align*}
U(P, f) - L(P, f) &= \sum_{j=0}^{m-1} (a_{j+1} - a_j)\left(\sup_{[a_j, a_{j+1}]} f - \inf_{[a_j, a_{j+1}]} f\right) \\
&\leq \sum_{j=0}^{m-1} (a_{j+1} - a_j) \cdot \frac{\varepsilon}{b - a} \\
&= \frac{\varepsilon}{b - a} \sum_{j=0}^{m-1} (a_{j+1} - a_j) = \frac{\varepsilon}{b - a} \cdot (b - a) = \varepsilon.
\end{align*}
Since $\varepsilon > 0$ was arbitrary, the [Riemann criterion](/theorems/281) is satisfied and $f$ is Riemann integrable.
[/step]