I need a hint for this question:
I need to prove that if $f: A \subseteq \mathbb{R}^n \to \mathbb{R}$ is bounded, where $A$ is an $n$-dimensional box, then $f$ is (Riemann) integrable iff for each $\epsilon>0$ there is a partition $P_{\epsilon}$ of $A$ such that $\sum_{B \in P_{\epsilon}} w_B \ vol(B) < \epsilon$, where $w_B = \sup_{x, y \in B} |f(x)-f(y)| \ \ \ \ \ \ (*)$.
I tried the following for one direction:
Take any $\epsilon>0$ and suppose $(*)$ holds. Then $\sum_{B \in P_{\epsilon}} |f(x_B)-f(y_B)| vol(B) < \epsilon$ for all $x_B, y_B \in B$. But then by the triangle inequality:
$| \sum_{B \in P_{\epsilon}} (f(x_B)-f(y_B))vol(B)| \leq \sum_{B \in P_{\epsilon}} |f(x_B)-f(y_B)| vol(B) < \epsilon$, so
$|\sum_{B \in P_{\epsilon}} f(x_B) vol(B) - \sum_{B \in P_{\epsilon}} f(y_B) vol(B)|< \epsilon \ \ \ \ \ (**)$.
I'm stuck here. If $f$ attained its bounds in each $B$, I could simply take $x_B$ and $y_B$ where $f$ reachs its supremum and infimum and then get that the upper sum and the lower sum with $P_{\epsilon}$ differ by less than $\epsilon$ and I'd be done. But $f$ is not necessarily continuous (it would be trivial otherwise). Have I taken a bad route? Any suggestions on how to procceed?
It seems quite possible that the other direction (once I figure this one) will consist of reversing the steps here, but I might be wrong.
Define $\underline{S} ( \mathcal{P}, f )$ as the lower sum of the function $f$ in the partition $\mathcal{P}$. Similarly define $\overline{S} ( \mathcal{P} , f )$. You should see that
$$\sum_{B \in P_{\epsilon}} w_B \ vol(B) = \overline{S} (\mathcal{P}, f ) - \underline{S} (\mathcal{P}, f )$$
Then, as the partition $\mathcal{p}$ get's finer, $\underline{S}$ increases and $\overline{S}$ decreases, and both are bounded so both should have a limit which are the lower and upper integrals by definition, $\underline{\int } f$ and $\overline{\int } f $, respectively.
Now, what you are asked to prove is that if for every $\epsilon $ there exists some partition $\mathcal{P}$ that $\sum_{B \in P_{\epsilon}} w_B \ vol(B) = \overline{S} (\mathcal{P}, f ) - \underline{S} (\mathcal{P}, f ) < \epsilon $, then the lower and upper integral are the same, i.e. $\overline{\int } f - \underline{\int } f < \epsilon $.
For the reverse implication, try to use that $\overline{\int } f =\underline{\int } f $ to limit the distance between a upper Riemann sum and a lower Riemann sum, both close enogh to the integrals.