My friend gave me this math problem as a challenge. The question procceeds as the following: Find the value of $$\int_{0}^{1} \lfloor \log_{2023}(x) \rfloor dx$$
My solution:
Looking at the expression $$\int_{0}^{1} \lfloor \log{2023}(x) \rfloor dx$$
We notice that the first thing we need to do is to break down the problem into pieces, using the definition of logs we can expand $$2023^{y}=x$$
We notice that the function $\lfloor \log_{2023}(x) \rfloor$ passes below $-1$ when $x\le\frac{1}{2024}$, therefore we can split this integral into two pieces: $$\int_{0}^{\frac{1}{2024}}\lfloor \log_{2023}\left(x\right) \rfloor dx+\int_{\frac{1}{2024}}^{1}\lfloor \log_{2023}\left(x\right) \rfloor dx$$
Now, taking advantage of the fact that when $\frac{1}{2024}<x<1$, then $\lfloor \log_{2023}(x) \rfloor = -1$. Evaluating this, we arrive at $$\int_{\frac{1}{2024}}^{1}\lfloor \log{2023}\left(x\right) \rfloor dx = -\frac{2023}{2024}$$ and putting this into our original equation gives us $$\int_{0}^{\frac{1}{2024}}\lfloor \log_{2023}\left(x\right) \rfloor dx – \frac{2023}{2024}$$
Looking at the left integral $$\int_{0}^{\frac{1}{2024}}\lfloor \log_{2023}\left(x\right) \rfloor dx$$
we notice that it is the infinite sum of rectangles. However, we need to calculate the widths of each separate rectangles. Remembering that this is $\log_{2023}$, we have $$\lfloor \log_{2023}\left(\frac{1}{2024^{n}}\right) \rfloor = -n-1$$ for all $n \in \mathbb{Z}$ where $n>0$.
Now we can approximate the sums via the sequence, $$\sum_{n=1}^{\infty}\frac{-n-1}{2024^{n}}$$
where $-n-1$ is the height of the rectangle and $\frac{1}{2024^{n}}$ is the width
thus, $$\int_{0}^{1} \lfloor \log{2023}(x) \rfloor dx = -\frac{2023}{2024} + \sum_{n=1}^{\infty}\frac{-n-1}{2024^{n}}$$ $$\approx-1.00049455984$$
Best Answer
We may as well treat the general problem of computing $$\int_0^1 \lfloor \log_b x \rfloor \,dx .$$
Hint Substituting $$x = b^{-y}$$ transforms the integral to $$\log b \int_0^\infty \lfloor -y \rfloor b^{-y} \,dy .$$ On each interval $(n, n + 1]$, $n \in \Bbb N$, $\lfloor -y \rfloor = -(n + 1)$, so we may rewrite the integral as $$-\log b \sum_{n = 0}^\infty (n + 1) \int_n^{n+1} b^{-y} \,dy.$$