Simple integral help How do I integrate $$\int_{0}^1 x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\}\, dx$$
Where $\lceil x \rceil $ is the ceiling function, and $\left\{x\right\}$ is the fractional part function

The main idea is to divide $(0,1)$ into "good" intervals. I'lll give only the main steps of computation
$$
\int\limits_{(0,1)} x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\} dx
=\sum\limits_{n=1}^\infty\int\limits_{n\leq \frac{1}{x}<n+1} x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\} dx
=\sum\limits_{n=1}^\infty\int\limits_{\frac{1}{n+1}< x\leq \frac{1}{n}} x (n+1) \left(\frac{1}{x}-n\right) dx
=\sum\limits_{n=1}^\infty\frac{1}{2n^2+2n}=\frac{1}{2}\sum\limits_{n=1}^\infty\left(\frac{1}{n}-\frac{1}{n+1}\right)=\frac{1}{2}
$$
