[proofplan]
Since $f$ is [continuous](/page/Continuity) on the compact interval $[a,b]$, it is uniformly continuous. Given $\varepsilon > 0$, [uniform continuity](/page/Uniform%20Continuity) provides $\delta > 0$ such that the oscillation of $f$ on any subinterval of length less than $\delta$ is at most $\varepsilon/(b-a)$. Choosing a partition with mesh size less than $\delta$ makes the total oscillation sum less than $\varepsilon$, and the [Integrability Criterion](/theorems/193) gives integrability.
[/proofplan]
[step:Invoke uniform continuity on the compact interval $[a,b]$]
Since $[a,b]$ is compact and $f: [a,b] \to \mathbb{R}$ is continuous, $f$ is uniformly continuous on $[a,b]$. Given $\varepsilon > 0$, 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*}
[guided]
Why does uniform continuity hold? The [Heine-Cantor theorem](/theorems/280) states that every [continuous](/page/Continuity) function on a compact [metric space](/page/Metric%20Space) is uniformly continuous. Since $[a,b] \subset \mathbb{R}$ is closed and bounded, it is compact by the [Heine-Borel theorem](/theorems/309). Therefore $f$, being continuous on a compact set, is uniformly continuous: for every $\varepsilon' > 0$ there exists $\delta > 0$ such that
\begin{align*}
|x - y| < \delta \implies |f(x) - f(y)| < \varepsilon'
\end{align*}
for all $x, y \in [a,b]$.
The specific bound $\varepsilon' = \varepsilon/(b-a)$ is chosen because in the next step we will sum oscillations $M_j - m_j < \varepsilon/(b-a)$ over subintervals whose lengths add up to $b - a$:
\begin{align*}
S(f, \mathcal{D}) - s(f, \mathcal{D}) = \sum_{j=1}^{n}(M_j - m_j)(x_j - x_{j-1}) < \frac{\varepsilon}{b-a} \sum_{j=1}^{n}(x_j - x_{j-1}) = \frac{\varepsilon}{b-a} \cdot (b-a) = \varepsilon.
\end{align*}
This calibration ensures the total oscillation sum equals exactly $\varepsilon$.
[/guided]
[/step]
[step:Choose a partition with mesh size less than $\delta$ and bound the oscillation]
Choose a partition $\mathcal{D} = \{x_0, x_1, \ldots, x_n\}$ of $[a,b]$ with mesh size $\|\mathcal{D}\| < \delta$. On each subinterval $[x_{j-1}, x_j]$, any two points $s, t \in [x_{j-1}, x_j]$ satisfy $|s - t| \le x_j - x_{j-1} < \delta$, so $|f(s) - f(t)| < \varepsilon/(b-a)$. Therefore
\begin{align*}
M_j - m_j = \sup_{[x_{j-1}, x_j]} f - \inf_{[x_{j-1}, x_j]} f < \frac{\varepsilon}{b - a}.
\end{align*}
Summing over all subintervals:
\begin{align*}
S(f, \mathcal{D}) - s(f, \mathcal{D}) &= \sum_{j=1}^{n}(M_j - m_j)(x_j - x_{j-1}) \\
&< \frac{\varepsilon}{b - a} \sum_{j=1}^{n}(x_j - x_{j-1}) \\
&= \frac{\varepsilon}{b - a} \cdot (b - a) = \varepsilon.
\end{align*}
By the [Integrability Criterion](/theorems/193), $f$ is Riemann [integrable](/page/Integral) on $[a,b]$.
[/step]