Conceptual question about Riemann Integral I've been working on some problems involving Riemann integrals, and I been having problems relating $sup\{\mathcal{L}(\mathcal{P},f)\}$ to some other known quantity, like $\mathcal{L}(\mathcal{P},f)$ for some particular partition $\mathcal{P}$.
One of the specific problems I've been working on is showing that $\lim_{n \to \infty} \frac{1}{n}\sum_{i=1}^{n}f(\frac{i}{n}) = \int\limits_0^1f(x)d(x)$
Using only the definition of Riemann integral, I have gotten to the point where I have set up an inequality:
$\lim_{n \to \infty} \frac{1}{n}\sum_{i=1}^{n}m_i \leq \lim_{n \to \infty} \frac{1}{n}\sum_{i=1}^{n}f(\frac{i}{n}) \leq \lim_{n \to \infty} \frac{1}{n}\sum_{i=1}^{n}M_i$,
Where $m_i$ & $M_i$ are the local infimum and supremum of the function in the $i$th interval. The problem I'm running into is getting the $sup\{\mathcal{L}(\mathcal{P},f)\}$ and $inf\{\mathcal{U}(\mathcal{P},f)\}$ related to these quantities, because the sup and inf of the lower and upper sums are for all partitions, not just the particular one.
The only idea I've had so far (after many missteps), is to try and use the Archimedean principle to find some $n_0$ such that $sup\{\mathcal{L}(\mathcal{P},f)\} + \epsilon \geq \frac{1}{n_0}\sum_{i=1}^{n_0}m_i$, and then let $\epsilon \to 0$, but if anyone has any insight they can offer on how to be thinking about relating $sup\{\mathcal{L}(\mathcal{P},f)\}$ to some particular $\mathcal{P}$ used in proving something like this, I would be much obliged.
 A: A couple of specific calculations (notation: denote by $U(f)$, the infimum over all partitions $P$ of $U(P,f)$; and denote by $L(f)$, the supremum over all partitions $P$ of $L(P,f)$. Here, $f:[a,b]\to \mathbb{R}$ is a continuous function):
Exercise 1: Prove that if $P,Q$ are partitions of $[a,b]$, then $L(P,f)\leq U(Q,f)$. (Hint: consider the common refinement $P\cup Q$ of $P$ and $Q$.) Conclude that $L(P,f)\leq L(f)\leq U(f)\leq U(P,f)$ for all partitions $P$ of $[a,b]$.
(i) A continuous function $f:[a,b]\to \mathbb{R}$ is Riemann integrable
Proof. A continuous function $f:[a,b]\to \mathbb{R}$ is necessarily uniformly continuous (compactness of the interval $[a,b]$). Choose $\epsilon > 0$. By uniform continuity, there exists $n\in \mathbb{N}$ such that $\left|f(x)-f(y)\right| < \epsilon$ whenever $\left|x-y\right|<\frac{1}{n}$ for $x,y\in [a,b]$. 
If $P$ is any partition of $[a,b]$, then $\left|U(P,f)-L(P,f)\right|< \frac{1}{n} \sum_{i=1}^{n} \epsilon = \epsilon$. Since $P$ is arbitrary, we conclude (by Exercise 1 above) that $\left|U(f)-L(f)\right|<\epsilon$ for all $\epsilon > 0$ - that is, $U(f)=L(f)$ and $f$ is Riemann integrable. Q.E.D.
Exercise 2: Now, using the technique of uniform continuity in the proof of (i), can you solve your problem? 
Exercise 3: Define $f:[0,1]\to \mathbb{R}$ by the rule $f(x)=1$ if $x\in \mathbb{Q}$ and $f(x)=0$ if $x\not\in \mathbb{Q}$. Calculate $U(f)$, $L(f)$, and prove that $f$ is not Riemann integrable.
Definition A function $f:[a,b]\to \mathbb{R}$ is almost continuous if the set of points of discontinuity of $f$ has measure $0$.
Exercise 4 (challenge): Prove that a function $f:[a,b]\to\mathbb{R}$ is Riemann integrable if and only if it is bounded and almost continuous.
Hope this helps! Please let me know if you're still stuck and I'm happy to help further.
