For $N\in\mathbb{N}$ how can the following integral be computed?
$$ \int_1^N\frac{\{x\}}{x}dx $$
The notation $\{x\}$ is the fractional part of $x$, so $\{x\}=x-\lfloor x\rfloor$.
Apparently, the integral evaluates to $N-1-N\ln{N}+\sum_{n=1}^N\ln{n}$. How to show this fact?
After graphing $\{x\}/x$, I think I must find the area under each 'slice':
$$ \sum_{n=1}^{N-1}\int_n^{n+1}\frac{\{x\}}{x}dx $$ But I cannot figure out an expression for the area under each slice. Is this the correct approach? Thanks!