Easier way to solve $\int_0^1 \frac{dx}{\lfloor{}1-\log_2(x)\rfloor}$

152 Views Asked by At

This problem showed up in the MIT integration bee last year: $$\int_0^1 \frac{dx}{\lfloor{}1-\log_2(x)\rfloor}$$

Basically, after doing a lot of tedious work I graphed out part of the function and noticed that the function was just a bunch of rectangles. The width of rectangle $n$ was $2^{-n}$ and the height was $\frac1n$ so the total area was: $$\sum_{n=1}^{\infty}({2^{-n}})(\frac1{n})$$

After some more work I recognized this to be the taylor series of $-\ln(1-x)$ evaluated at $x=\frac12$ and since $-\ln(1-\frac12)=\ln(2)$, I concluded that the integral was equal to $\ln(2)$, which some numerical integration verified for me.

My question is, is there any easier way to do this that maybe isn't so tedious?

2

There are 2 best solutions below

4
On BEST ANSWER

Let's see, if you do $u=1-\log_2 x$ then

$$-2^{1-u}(\log 2)\, du=dx$$

Then you get

$$(\log 2)\cdot \int_{1}^\infty{2^{1-u}\over \lfloor u\rfloor}\,du$$

This is clearly

$$2(\log 2)\sum_{n=1}^\infty \int_n^{n+1}{2^{-u}\over \lfloor u\rfloor}\,du$$

But on the interval $[n,n+1)$ by definition the floor function is equal to $n$, so the integrand is just ${2^{-u}\over n}$ on that interval, which allows us to rewrite this as

$$2(\log 2)\sum_{n=1}^\infty {1\over n}\int_n^{n+1}2^{-u}\,du$$

the inner integral is easily seen to be

$$\left({1\over2\log 2}\right)2^{-n}$$

and of course this gives

$$\sum_{n=1}^\infty {1\over n2^n}=\log 2$$

Of course this is still the same sum, but you don't have to do any guessing, it's all definitely the right thing, without experimenting--and you don't need any numerical tests to verify it as a guess.

0
On

$$\lfloor 1 - \log_2 x \rfloor = \lfloor \log_2 2 - \log_2 x \rfloor = \left\lfloor \log_2 \frac{2}{x} \right\rfloor.$$ Now note $$n \le \log_2 \frac{2}{x} < n+1$$ whenever $2^{n-1} \le \frac{1}{x} < 2^n$, or equivalently, $$2^{-n} < x \le 2^{1-n}.$$ So we immediately have $$\int_{x=0}^1 \frac{dx}{\lfloor 1 - \log_2 x \rfloor} = \sum_{n=1}^\infty \frac{1}{n} (2^{1-n} - 2^{-n}) = \sum_{n=1}^\infty \frac{1}{n 2^n}.$$ Now consider the geometric series $$\frac{1}{1-z} = \sum_{n=0}^\infty z^n, \quad |z| < 1. $$ Integration with respect to $z$ gives $$-\log(1-z) = \sum_{n=0}^\infty \frac{z^{n+1}}{n+1} = \sum_{n=1}^\infty \frac{z^n}{n}, \quad |z| < 1.$$ Now for $z = 1/2$ we find the integral has value $-\log(1-\tfrac{1}{2}) = \log 2$.