First assume that for every
\(\varepsilon \gt 0\) there exists a partition
\(P\) with
\(U(P,f)-L(P,f) \lt \varepsilon\text{.}\) By
Corollaryย 7.1.5,
\begin{equation*}
0
\le
\overline{\int_a^b} f
-
\underline{\int_a^b} f
\le
U(P,f)-L(P,f).
\end{equation*}
Since the right-hand side can be made arbitrarily small, the difference of the upper and lower integrals must be \(0\text{.}\) Hence \(f\) is integrable.
Conversely, suppose \(f\) is integrable, and let \(I=\int_a^b f\text{.}\) Given \(\varepsilon \gt 0\text{,}\) choose partitions \(P'\) and \(P''\) such that
\begin{equation*}
U(P',f) \lt I+\frac{\varepsilon}{2}
\qquad\text{and}\qquad
I-\frac{\varepsilon}{2} \lt L(P'',f).
\end{equation*}
Let \(P=P' \cup P''\text{.}\) Then \(P\) refines both \(P'\) and \(P''\text{,}\) so
\begin{equation*}
I-\frac{\varepsilon}{2}
\lt
L(P'',f)
\le
L(P,f)
\le
U(P,f)
\le
U(P',f)
\lt
I+\frac{\varepsilon}{2}.
\end{equation*}
Therefore \(U(P,f)-L(P,f) \lt \varepsilon\text{.}\)