# A nice limit

#### Krizalid

##### Active member
For any integrable function on $[0,1]$ prove that $\displaystyle \mathop {\lim }\limits_{n \to \infty } \frac{1}{n}\sum\limits_{k = 0}^{n - 1} {(n - k)\int_{\frac{k}{n}}^{\frac{{k + 1}}{n}} {f(x)\,dx} } = \int_0^1 {(1 - x)f(x)\,dx} .$

#### Krizalid

##### Active member
This one is pretty tricky, so write $n-k$ as a sum and reverse the order of the sums.

#### oasi

##### New member
This one is pretty tricky, so write $n-k$ as a sum and reverse the order of the sums.
i couldnt imagine ,how to solve this

#### Krizalid

##### Active member
Give it a try! It's a nice problem!

#### Opalg

##### MHB Oldtimer
Staff member
For any integrable function on $[0,1]$ prove that $\displaystyle \mathop {\lim }\limits_{n \to \infty } \frac{1}{n}\sum\limits_{k = 0}^{n - 1} {(n - k)\int_{\frac{k}{n}}^{\frac{{k + 1}}{n}} {f(x)\,dx} } = \int_0^1 {(1 - x)f(x)\,dx} .$
Let $$\displaystyle F(x) = \int_0^xf(t)\,dt.$$ Then $$\frac{1}{n}\sum_{k = 0}^{n - 1} (n - k)\int_{k/n}^{(k+1)/n}\!\!\! f(x)\,dx = \frac1n \sum_{k = 0}^{n - 1} (n-k)\bigl(F(\tfrac{k+1}n\bigr) - F\bigl(\tfrac kn\bigr)\bigr) = \frac1n \sum_{k = 0}^{n - 1} (n-k)F(\tfrac{k+1}n\bigr) - \frac1n \sum_{k = 0}^{n - 1}(n-k) F\bigl(\tfrac kn\bigr).$$ The first of those two sums is $$\sum_{j = 0}^{n - 1} (n-j)F(\tfrac{j+1}n\bigr) = \sum_{k=1}^{n} (n-k+1)F(\tfrac{k}n\bigr) = F(1) - F(0) + \sum_{k=0}^{n-1} (n-k+1)F(\tfrac{k}n\bigr)$$ (first writing $j$ instead of $k$, and then letting $k=j+1$). Therefore \begin{aligned}\frac{1}{n}\sum_{k = 0}^{n - 1} (n - k)\int_{k/n}^{(k+1)/n}\!\!\! f(x)\,dx &= \frac1n\Bigl(F(1) - F(0) + \sum_{k=0}^{n-1} (n-k+1)F(\tfrac{k}n\bigr)\Bigr) - \frac1n \sum_{k = 0}^{n - 1}(n-k) F\bigl(\tfrac kn\bigr) \\ &= \frac{F(1)}n + \frac1n\sum_{k=0}^{n-1}F(\tfrac{k}n\bigr).\end{aligned} As $n\to\infty$, $F(1)/n\to0$ and the Riemann sum $$\displaystyle \frac1n\sum_{k=0}^{n-1}F(\tfrac{k}n\bigr)$$ converges to $$\displaystyle \int_0^1F(x)\,dx.$$ But (integrating by parts) $$\displaystyle \int_0^1 {(1 - x)f(x)\,dx} = \Bigl[(1-x)F(x)\Bigr]_0^1 + \int_0^1F(x)\,dx = \int_0^1F(x)\,dx.$$ Put those results together to see that $$\lim_{n\to\infty}\frac1n \sum_{k=0}^n (n-k) \int_{k/n}^{(k+1)/n}\!\!\!f(x)\,dx = \int_0^1(1-x)f(x)\,dx.$$