<s>[INST] Calculate $\int_0^1{x·\lceil1/x\rceil dx}$ I am trying to calculate following integral:
$$\int_0^1{x·\biggl\lceil \frac{1}{x}\biggr\rceil dx}$$
I tried usual change t=1/x but not able to further advance.
Thanks! 
 [/INST] If $\frac 1{n} \le x < \frac 1{n-1}$ then $\lceil \frac 1x \rceil = n$. and $\int_{\frac 1{n}}^{\frac 1{n-1}} x\lceil \frac 1x \rceil dx= \int_{\frac 1{n}}^{\frac 1{n-1}} xn dx = n\frac {x^2}2|_{\frac 1n}^{\frac 1{n-1}}= \frac n2(\frac 1{(n-1})^2 -\frac 1{n^2}=\frac n2(\frac {2n-1}{n^2(n-1)^2})=\frac 1{(n-1)^2} - \frac {1}{2n(n-1)^2}$
So $\int_{0}^{1} x\lceil \frac 1x \rceil dx=\sum\limits_{n=2}^\infty \int_{\frac 1{n}}^{\frac 1{n-1}} x\lceil \frac 1x \rceil dx=\sum\limits_{n=2}^\infty[\frac 1{(n-1)^2} - \frac {1}{2n(n-1)^2}]=\sum\limits_{n=1}^\infty[\frac 1{n^2} - \frac {1}{2(n+1)n^2}]$
</s>