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: 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|
&=\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|\\
&\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]
&\le\epsilon
\end{align}
$$
A: It is exactly as you say. The limit on the left is a limit of Riemann sums of $f$ in the interval $[0,1]$. 
A: Since $f$ is continuous, it is Riemann integrable, so by definition for each $\varepsilon>0$ there exists a partition $P$ such that for all partitions $P'=\{0=x_1<x_2<\dots<x_N=1\}$ which are finer than $P$ we have
$$ \sum_{k=1}^N  \max_{x\in [x_{k-1},x_k]}f(x) \cdot (x_{k}-x_{k-1})  -\int _0^1 f(x) dx<\varepsilon$$
and 
$$ \int _0^1 f(x) dx -\sum_{k=1}^N  \min_{x\in [x_{k-1},x_k]}f(x) \cdot (x_{k}-x_{k-1})<\varepsilon $$
The partition $\{0,1/n,2/n,\dots,(n-1)/n,1\}$, $x_k=k/n$ will be finer than $P$ for large $n$, and since in this case we have $x_{k}-x_{k-1} =k/n- (k-1)/n= 1/n$, we have 
$$ \sum_{k=1}^n  \max_{x\in [x_{k-1},x_k]}f(x) \frac{1}{n}  -\int _0^1 f(x) dx<\varepsilon$$
and 
$$ \int _0^1 f(x) dx -\sum_{k=1}^n  \min_{x\in [x_{k-1},x_k]}f(x) \frac{1}{n}<\varepsilon $$
Now, also observe that 
$$ \min_{x\in [x_{k-1},x_k]}f(x)\leq f(k/n)\leq \max_{x\in [x_{k-1},x_k]}f(x)$$
and combining this with the above inequalities you obtain
$$ \left|\sum_{k=1}^n  f(k/n) \frac{1}{n}  -\int _0^1 f(x) dx \right|<\varepsilon $$
which is true for large $n$. This gives you the result.
A: Continuity of $f$ plays no rôle in this game, we only have to assume that the Riemann integral $\int_a^b f(x)\>dx$ exists.
For a function $f:\ [a,b]\to{\mathbb R}$ and a subinterval $Q\subset[a,b]$ write
$$|\Delta f|_Q:=\sup_{x\in Q} f(x)-\inf_{x\in Q} f(x)\ .$$
Such a function is Riemann integrable over $[a,b]$ if for any $\epsilon>0$ there is a partition $P$ of $[a,b]$ into subintervals $Q_k=[x_{k-1}, x_k]$ $\>(1\leq k\leq N)$ such that
$$D_P(f):=\sum_{k=1}^N |\Delta f|_{Q_k}(x_k-x_{k-1})<\epsilon\ .$$
When $f$ passes this simple test then there is a unique number $S\in{\mathbb R}$ such that
$$|R_P-S|\leq D_P(f)\tag{1}$$
for all partitions $P$ and all Riemann sums $R_P=\sum_{k=1}^N f(\xi_k)(x_k-x_{k-1})$ computed using $P$. This $S$ is called the integral of $f$ over $[a,b]$, and is denoted by $\int_a^b f(x)\ dx$.
The following Lemma has been proved several times on MSE: When $f$ is integrable over $[a,b]$ then for each $\epsilon>0$ there is $\delta >0$ such that $D_P(f)<\epsilon$ as soon as $\max_{1\leq k\leq N}(x_k-x_{k-1})<\delta$.
We now argue as follows: Given an $\epsilon>0$ choose a $\delta>0$ according to the Lemma. There is an $n_0$ such that ${b-a\over n_0}<\delta$. Denote the partition  considered in the question by $P_n$ and the displayed Riemann sum by $R_n$. When $n>n_0$ then ${b-a\over n}<\delta$. Therefore it follows from the principle $(1)$ that
$$\left|R_n-\int_a^b f(x)\ dx\right|\leq D_{P_n}(f)< \epsilon\ .$$
A: $ f(x) =f(0)+\frac{f'(0)x}{1!}+\frac{f''(0)x^2}{2!}+.....=\sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} x^n $
$$\int _0^x {f(t) dt}=\int _0^x(\sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} t^n)dt=\sum_{n=0}^{\infty} (\frac{f^{(n)}(0)}{n!}\int _0^x t^n dt)=\sum_{n=0}^{\infty} (\frac{f^{(n)}(0)}{n!}\frac{x^{n+1}}{n+1})$$
$$\int _0^x {f(t) dt}=\sum_{n=0}^{\infty} \frac{f^{(n)}(0)x^{n+1}}{(n+1)!}$$   $$(1)$$

$$f(\frac{kx}{n})=\sum_{m=0}^{\infty} \frac{f^{(m)}(0)}{m!} (\frac{kx}{n})^m$$
$$\sum \limits_{k=1}^{n}   k^m=\frac{n^{m+1}}{m+1}+a_mn^m+....+a_1n=\frac{n^{m+1}}{m+1}+\sum \limits_{j=1}^m a_jn^j$$  where $a_j$ are constants.
More information about summation http://en.wikipedia.org/wiki/Summation
$$\lim_{n\to\infty} \frac{x}{n}\sum \limits_{k=1}^n f(\frac{kx}{n})=\lim_{n\to\infty} \frac{x}{n}\sum \limits_{k=1}^n \sum_{m=0}^{\infty} \frac{f^{(m)}(0)}{m!} (\frac{kx}{n})^m=\lim_{n\to\infty} \frac{x}{n}\sum_{m=0}^{\infty} \frac{x^m}{n^m} \frac{f^{(m)}(0)}{m!} \sum \limits_{k=1}^n k^m=\lim_{n\to\infty} \frac{x}{n}[f(0)n+\frac{f'(0)x}{n 1!}(\frac{n^2}{2}+\frac{n}{2})+ \frac{f''(0)x^2}{n^2 2!}(\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6})+\frac{f'''(0)x^3}{n^3 3!}(\frac{n^4}{4}+\frac{n^3}{2}+\frac{n^2}{4})+\frac{f^{(4)}(0)x^4}{n^4 4!}(\frac{n^5}{5}+\frac{n^4}{2}+\frac{n^3}{3}-\frac{n}{30})+...... ]=
\lim_{n\to\infty} [f(0)x+\frac{f'(0)x^2}{n^2 1!}(\frac{n^2}{2}+\frac{n}{2})+ \frac{f''(0)x^3}{n^3 2!}(\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6})+\frac{f'''(0)x^4}{n^4 3!}(\frac{n^4}{4}+\frac{n^3}{2}+\frac{n^2}{4})+\frac{f^{(4)}(0)x^5}{n^5 4!}(\frac{n^5}{5}+\frac{n^4}{2}+\frac{n^3}{3}-\frac{n}{30})+...... ]= [f(0)x+\frac{f'(0)x^2}{ 2!}+ \frac{f''(0)x^3}{ 3!}+\frac{f'''(0)x^4}{ 4!}+\frac{f^{(4)}(0)x^5}{ 5!}+...... ]$$
$$\lim_{n\to\infty} \frac{x}{n}\sum \limits_{k=1}^n f(\frac{kx}{n})=\sum_{m=0}^{\infty} \frac{f^{(m)}(0)x^{m+1}}{(m+1)!}$$
$$(2)$$
Equation $(1)$ and equation $(2)$ are equal to each other. Thus 
$$\lim_{n\to\infty} \frac{x}{n}\sum \limits_{k=1}^n f(\frac{kx}{n})=\int _0^x {f(t) dt}$$
A: 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!
