The definition of Riemann integrable on my textbook is:

I want to prove if $U(f)=L(f)$, then $f$ is Riemann integrable using this definition.
The converse of this statement is easy to prove, but I wonder how I can prove it in this direction.
Copyright © 2021 JogjaFile Inc.

Let $\epsilon>0$ be given. Then, there exists a partition $P_{1}$ such that $U(P_{1},f)-U(f)<\frac{\epsilon}{2}$ and there exists a partition $P_{2}$ such that $L(f)-L(P_{2},f)<\frac{\epsilon}{2}$. These inequalities are from the approximation property for the infimum and supremum, respectively. Now, let $P$ be the common refinement so it follows that \begin{equation} U(P_{1},f) > U(P,f)\geq U(f) \text{ and } L(P_{2},f)<L(P,f)\leq L(f)\end{equation} and consequently, \begin{align} 0\leq U(P,f)-L(P,f)&=U(P,f)-U(f)+L(f)-L(P,f) \\ &<U(P_{1},f)-U(f)+L(f)-L(P_{2},f)<\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon \end{align} which completes the proof. I am sure, by the way, that your textbook has an explanation of the common refinement of two partitions if you have not seen this before.