# Riemann sum of $x\cdot \ln(x)$

I did not find any information regarding this Riemann sum anywhere:

Riemann sum of $f(x)=\begin{cases} 0& x=0 \\ x\cdot \ln(x)& \text{otherwise}\end{cases}$ in the interval $[0, 1]$.

I don't want the answer given to me, I'm only looking for a hint that could guide me in the right direction. I have already proved that the function is continuous in this interval, i.e can be integrated in it also.

• What about en.wikipedia.org/wiki/Riemann_sum ? Sep 16, 2018 at 14:07
• I understand how to compute a Riemann sum, its the particular series that arises from this sum that I am having trouble with. I know it tends to -1/4 (because of the value of the integral when computed using a definite integral) but I am not able to prove this. Thank you for your answer Sep 16, 2018 at 14:18
• There is no reason to think there is a "closed form" for the sum $\sum^n_{k=1}\frac kn\ln\left(\frac kn\right)\frac1n$ Sep 16, 2018 at 23:47

The sum can be written as

$$S_n = \frac{1}{n^2}\sum_{k=1}^nk \log k -\frac{\log n}{n^2}\sum_{k=1}^nk = \frac{1}{n^2}\sum_{k=1}^nk \log k -\frac{\log n}{n^2}\frac{n(n+1)}{2} \\ = \frac{1}{n^2}\sum_{k=1}^nk (\log k- H_k) -\frac{\log n}{n^2}\frac{n(n+1)}{2} + \frac{1}{n^2}\sum_{k=1}^nk H_k$$

where $H_n = \sum_{k=1}^n \frac{1}{k}$

Using summation by parts, we have

$$\frac{1}{n^2}\sum_{k=1}^nk H_k = \frac{1}{n^2}H_n \sum_{k=1}^n k + \frac{1}{n^2}\sum_{k=1}^{n-1}\left(\sum_{j=1}^kj \right)(H_k - H_{k+1}) \\ = \frac{H_n}{n^2}\frac{n(n+1)}{2} - \frac{1}{4}\left(1 - \frac{1}{n}\right)$$

Hence,

$$S_n = -\frac{1}{n^2}\sum_{k=1}^nk (H_k - \log k) + \frac{H_n -\log n}{n^2}\frac{n(n+1)}{2} - \frac{1}{4}\left(1 - \frac{1}{n}\right)$$

Using the fact that $H_n - \log n \to \gamma$ as $n \to \infty$, we can show, with some additional work, that the contribution of the first and second terms cancels in the limit as $n \to \infty$ and we have

$$\lim_{n \to \infty} S_n = - \frac{1}{4} = \int_0^1 x \log x \, dx$$

Note that for any $\epsilon > 0$ there exists $N$ such that $\gamma - \epsilon < H_k - \log k < \gamma + \epsilon$ when $k > N$.
$$\sum_{k=1}^nk (H_k - \log k) = \frac{1}{n^2}\sum_{k=1}^Nk (H_k - \log k)+ \frac{1}{n^2}\sum_{k=N+1}^nk (H_k - \log k)$$