Suppose $f:[a,b]\to \mathbb{R}$ is integrable. Show that the Rieman integral of $f$ is the unique real number $r$ satisfying the following condition:
For every $\epsilon >0$,$\enspace \exists \enspace P_{\epsilon},$ scuch that: $r-\epsilon < L(P_{\epsilon},f) \leq r \leq U(P_{\epsilon},f)<r+\epsilon$.
In class I was taught a theorem which matches with the above question to some extent.
Theorem: Let $f:[a,b]\to \mathbb{R}$ be a bounded function. Then f id integrable on $[a,b]$ iff ( if and only if) for each $\epsilon >0$ there is a partition P such that:$$U(P,f)-L(P,f) <\epsilon$$
I can some how tell that the prove of the question will be similar to the above theorem. But I am unable to think where to start and how to proceed.
(I am new to Real analysis and have hard time digesting rigorous proofs).
Any help will be appreciated.
Take $\varepsilon>0$ and let $r=\int_a^bf(x)\,\mathrm dx$. There is some partition $P_\varepsilon$ of $[a,b]$ such that $U(P_\varepsilon,f)-L(P_\varepsilon,f)<\varepsilon$. Since $r\in\bigl[L(P_\varepsilon,f),U(P_\varepsilon,f)\bigr]$, $U(P_\varepsilon,f)<r+\varepsilon$ and $L(P_\varepsilon,f)>r-\varepsilon$. So, if $r=\int_a^bf(x)\,\mathrm dx$, then the property from the statement holds.
Now, take $r\ne\int_a^bf(x)\,\mathrm dx$. Suppose, for instance, that $r<\int_a^bf(x)\,\mathrm dx$. Take $\varepsilon=\int_a^bf(x)\,\mathrm dx-r$. If there was some partition $P_\varepsilon$ of $[a,b]$ with $r-\varepsilon<L(P_\varepsilon,f)\leqslant r\leqslant U(P_\varepsilon,f)<r+\varepsilon$, then $\int_a^bf(x)\,\mathrm dx$ would also belong to the interval $\bigl[L(P_\varepsilon,f),U(P_\varepsilon,f)\bigr]$; in particular, $\int_a^bf(x)\,\mathrm dx<r+\varepsilon$. But that is not true, since $\int_a^bf(x)\,\mathrm dx=r+\varepsilon$. The case in which $r>\int_a^bf(x)\,\mathrm dx$ is similar.