Prove that $\lim_{n\rightarrow\infty} \frac{1}{n}\sum_{k = 1}^{n}{f(\frac{k}{n}) }$ $=\int_0^1 f(x)dx.$ Question:

Let $f$ be continuous on $[0,1]$. Prove that

$\lim_{n\rightarrow\infty} \frac{1}{n}\sum_{k = 1}^{n}{f(\frac{k}{n}) }$ $=\int_0^1 f(x)dx.$

where $k=0,1,...,n.$

Attempt:

I don't even know where to start. It makes sense reading the sum, as $k\rightarrow n$, and dividing it by the number of partitions, I should reach the definition of the integral. Hoping for a little push to get started.
A continuous function on a compact set is uniformly continuous.

Given an $\epsilon\gt0$, find an $N$ so that if $|x-y|\le\frac1N$ we have $|f(x)-f(y)|\le\epsilon$. Thus, for any $n\ge N$,
$$
\int_{\large\frac{k-1}n}^{\large\frac kn}\left|\,f\left(\frac kn\right)-f(x)\,\right|\,\mathrm{d}x\le\frac\epsilon{n}
$$
Therefore, for $n\ge N$,
$$
\begin{align}
\left|\,\sum_{k=1}^nf\left(\frac kn\right)\frac1n-\int_0^1f(x)\,\mathrm{d}x\,\right|
&amp;=\left|\,\sum_{k=1}^n\left(\int_{\large\frac{k-1}n}^{\large\frac kn}f\left(\frac kn\right)\,\mathrm{d}x-\int_{\large\frac{k-1}n}^{\large\frac kn}f(x)\,\mathrm{d}x\right)\,\right|\\
&amp;\le\sum_{k=1}^n\int_{\large\frac{k-1}n}^{\large\frac kn}\left|\,f\left(\frac kn\right)-f(x)\,\right|\,\mathrm{d}x\\[6pt]
&amp;\le\epsilon
\end{align}
$$
The first thing I notice is that we will be multiplying by zero as the current formula stands (constant divided by infinity is zero). But, intuitively, we can not say the integral of the two parts will be zero. This leads me to thinking of rewriting the sum using some formula. In fact, if we prove this formula, we have our answer!