sum approximation of a Lipschitz-continuous function Let $f: [0, 1] \to \mathbb{R}$ be a Lipschitz continuous function with a Lipschitz constant $L > 0$, meaning:
$$|f(x) - f(y)| ≤ L|x - y|  \space\space\space \forall x, y \in [0, 1]$$
For the approximation of $f$ using Riemann-sums with equidistant supporting points, proof the following statement:
$$\left|\int_0^1 f(x)dx - \frac{1}{n} \sum_{k=1}^n f\left(\frac{k}{n}\right) \right|\space ≤ \frac{L}{n} $$
Now, as I haven't worked much with Riemann sums yet, I thought that solving this using the mean value theorem for integration might be a proper way, but I haven't come so far yet. Thanks in advance!
 A: As you suggests, mean value theorem is one way to do this: first write
$$\int_0^1 f(x)dx=\sum_{k=1}^n\int_{\frac{k-1}{n}}^{\frac{k}{n}}f(x)dx$$
For each $k$, by mean value theorem, there is $\xi_k\in\left[\frac{k-1}{n},\frac{k}{n}\right]$ such that
$$f(\xi_k)=\frac{1}{\frac{k}{n}-\frac{k-1}{n}}\int_{\frac{k-1}{n}}^{\frac{k}{n}}f(x)dx\quad\Rightarrow\quad \frac{f(\xi_k)}{n}=\int_{\frac{k-1}{n}}^{\frac{k}{n}}f(x)dx$$
It follows that
$$\begin{aligned}\left|\int_0^1f(x)dx-\frac{1}{n}\sum_{k=1}^nf(\frac{k}{n})\right|&=\left|\frac{1}{n}\sum_{k=1}^n\left(f(\xi_k)-f(\frac{k}{n})\right)\right|\\
&\leq\frac{1}{n}\sum_{k=1}^n\left|f(\xi_k)-f(\frac{k}{n})\right|\\
&\leq\frac{1}{n}\sum_{k=1}^nL\left|\xi_k-\frac{k}{n}\right|\\
&\leq \frac{1}{n}\sum_{k=1}^n\frac{L}{n}\\
&=\frac{L}{n}
\end{aligned}$$
A: Write 
$$\int_{(k-1)/n}^{k/n}f(x)\mathrm dx-\frac 1nf\left(\frac kn\right)=
\int_{(k-1)/n}^{k/n}\left(f(x)-f\left(\frac kn\right)\right)\mathrm dx.$$
Bound the integrand using the Lipschitz assumption, then sum over $k$.
