4

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!

Hikawa
  • 65

2 Answers2

4

Try using this:

$$\int_{n}^{n+1} {\lfloor x\rfloor\, dx \over x} = \int_{n}^{n+1} {n\, dx \over x} = n(\log(n+1) - \log(n)).$$

jjagmath
  • 18,214
ncmathsadist
  • 49,383
  • 1
    It had escaped me that I can just change $\lfloor x\rfloor$ to $n$. This is very helpful, thank you for the tip. – Hikawa Mar 19 '21 at 09:04
4

As you know the integral is $$ \begin{align} \sum_{n=1}^{N-1} \int_{n}^{n+1} \dfrac{\{x \}}{x}dx &= \sum_{n=1}^{N-1} \int_{n}^{n+1} \dfrac{x- \lfloor x \rfloor}{x}dx \\ &= \sum_{n=1}^{N-1} \int_{n}^{n+1} 1- n \dfrac{1}{x}dx \\ &= N-1 - \sum_{n=1}^{N-1} n \ln(n+1) - n\ln(n) \\ &= N-1 - \sum_{n=1}^{N-1} (n+1) \ln(n+1) - n\ln(n) - \ln(n+1) \end{align} $$

And now you can continue