Proof about Riemann integrability of a bounded function

I tried to prove the following, please could somebody tell me if my proof is correct?

If $f: [a,b]\to \mathbb R$ is a bounded Riemann integrable function then for every $\varepsilon > 0$ there exists a $\delta > 0$ such that for any $\delta$-fine tagged partition $P$ it follows that $$\left |\int_a^b f - R(P,f) \right |<\varepsilon$$where $R(P,f)$ is the Riemann sum for this tagged partition.

My proof: Let $\varepsilon > 0$. Let $S$ be the set of all partitions $P$ such that $U(f,P) - L(f,P) < {\varepsilon \over 2}$ (here $U(f,P)$ and $L(f,P)$ are upper and lower Riemann sum respectively). Let $\delta = \sup \{ |x_k-x_{k+1}|\mid x_k,x_{k+1}\in P \text{ for some } P \in S\}$.Then for any $\delta$-fine tagged partition $Q$:

$$\left |\int_a^b f - R(Q,f) \right |= \left |U(f) - R(Q,f) \right | \le |U(f) - L(f,Q)| \le {\varepsilon \over 2} < \varepsilon$$

You can't be sure at this point in your proof, depending on the starting premise, that any other partition $Q$ with mesh $||Q||<\delta$ is necessarily in the set $S$.

What you are trying to prove is usually taken as the definition that $f$ is Riemann integrable.

The function $f:[a,b] \rightarrow \mathbf{R}$ is Riemann integrable with integral value $I$ if for every $\epsilon > 0$ there is a $\delta >0$ such that for any partition $P = (x_0,x_1,\ldots,x_n)$ with $||P|| = \max_{1 \leq i\leq n}(|x_i-x_{i-1}|)< \delta$ and any set of tags $\xi_i \in [x_{i-1},x_i]$ then

$$\left|\sum_{i=1}^{n}f(\xi_i)(x_i-x_{i-1})- I\right|=|S(P,f)-I| < \epsilon.$$

If $f$ is Riemann integrable, then it must be bounded.

So I assume you are trying prove this starting from Darboux's criterion for integrability.

The bounded function $f:[a,b] \rightarrow \mathbb{R}$ is Riemann integrable if the upper and lower Darboux integrals are equal. Or, equivalently, if for any $\epsilon > 0$ there exists a partition $P$ such that $U(P,f)-L(P,f) < \epsilon$

$$\int_{a}^{b}f=I=U(f) = L(f),$$

where

$$U(f) = \inf_{P} \,U(P,f),\\ L(f)= \sup_{P} \,L(P,f)$$

This implies that for any $\epsilon > 0$ there are partitions $P_1$ and $P_2$ such that $I-\epsilon/2 < L(P_1,f)$ and $U(P_2,f) < I+\epsilon/2.$ Let $P_3 = P_1 \cup P_2$ be a common refinement. Note that a partition $P'$ is a refinement of $P$ if every point in $P$ is also in $P'$. If $P'$ refines $P$ then $||P'|| \leq ||P||$, but the converse is not necessarily true.

Then

$$I-\epsilon/2 < L(P_1,f) \leq L(P_3,f) \leq U(P_3,f) \leq U(P_2,f)< I + \epsilon/2.$$

At this point, you can show that any tagged Riemann sum corresponding to a partition that refines $P_3$ is within $\epsilon$ of $I$, but you still need to show that this is true if the mesh of the partition is sufficiently small regardless of whether or not it refines $P_3.$

Let $D=\sup\{|f(x)−f(y)|:x,y∈[a,b]\}$ denote the maximum oscillation of $f$ and let $δ=ϵ/2mD\,$ where $m$ is the number of points in the partition $P_3$ .

Now let $P$ be any partition with $||P|| < \delta$ . Form the common refinement $Q=P∪P_3$ .

You will see that the upper sums $U(P,f)$ and $U(Q,f)$ differ in at most $m$ sub-intervals and at each the deviation is bounded by $δD$, and

$$|U(P,f)-U(Q,f)| < m\delta D=mD\frac{\epsilon}{2mD}=\epsilon/2$$

It follows that

$$U(P,f)<U(Q,f)+ϵ/2\leq U(P_3,f)+ϵ/2<I+ϵ.$$

By a similar argument, you can show $L(P,f)>I−ϵ$.

Hence for any tagged Riemann sum, $S(P,f)$

$$I-\epsilon < L(P,f)\leq S(P,f)\leq U(P,f) < I+ϵ,$$

and

$$|I - S(P,f)| < \epsilon.$$