Integral of the floor function. Can anyone prove the following identity? How can I show that $$\int_{2}^{x} \lfloor \log_{y} {x} \rfloor ~ dy = x$$
or failing that $$\int_{2}^{x} \lfloor \log_{y} {x} \rfloor ~ dy \sim x$$
Thanks in advance!
 A: $$S(x)=\int_{2}^{x} \lfloor {\log_{y} {x} }\rfloor ~ dy = \int_{2}^{x} \big\lfloor \frac{\ln(x)}{\ln(y)} \big\rfloor ~ dy $$
Change of variable : $\quad t=\frac{\ln(x)}{\ln(y)} \quad\to\quad y=x^{1/t}\quad\to\quad dy=-\frac{x^{1/t}\ln(x)}{t^2}dt$
$$S(x)=\int_{1} ^{\ln(x)/\ln(2)} \lfloor {t}\rfloor \frac{x^{1/t}\ln(x)}{t^2}~ dt $$
$n= \lfloor {\frac{\ln(x)}{\ln(2)}}\rfloor \quad\to\quad \ln(x)\int_{1}^n \lfloor {t}\rfloor \frac{x^{1/t}}{t^2}~ dt <S(x)< \ln(x)\int_{1} ^{n+1} \lfloor {t}\rfloor \frac{x^{1/t}}{t^2}~ dt$ 
$$\int_{1}^n \lfloor {t}\rfloor \frac{x^{1/t}}{t^2}~ dt = \sum_{k=2}^n \int_{k-1}^k \lfloor {t}\rfloor \frac{x^{1/t}}{t^2}~ dt  = \sum_{k=2}^{n} (k-1) \int_{k-1}^k\frac{x^{1/t}}{t^2}~ dt$$
$$\ln(x)\sum_{k=2}^{n} (k-1) \int_{k-1}^k\frac{x^{1/t}}{t^2}~ dt <S(x)< \sum_{k=2}^{n+1} (k-1) \int_{k-1}^k\frac{x^{1/t}}{t^2}~ dt$$
$\int_{k-1}^k\frac{x^{1/t}}{t^2}~ dt = \left[-\frac{x^{1/t}}{\ln(x)}\right]_{t=k-1}^{t=k} = \frac{x^{1/(k-1)}-x^{1/k} }{\ln(x)}$
$$\sum_{k=2}^{n} (k-1)\left(x^{1/(k-1)}-x^{1/k}\right)  <S(x)< \sum_{k=2}^{n+1} (k-1)\left(x^{1/(k-1)}-x^{1/k}\right)$$
$$\sum_{k=2}^{n} (k-1)\left(x^{1/(k-1)}-x^{1/k}\right)  <S(x)< \sum_{k=2}^{n+1} (k-1)\left(x^{1/(k-1)}-x^{1/k}\right)$$
$$f_n(x)=\frac{1}{x}\sum_{k=2}^{n} (k-1)\left(x^{1/(k-1)}-x^{1/k}\right) $$
$$f_n(x)<\frac{S(x)}{x}<f_{n+1}(x)$$
After simplification :  
$$f_n(x)=1+\sum_{k=2}^{n-1} x^{-(k-1)/k}-(n-1) x^{-(n-1)/n}$$
$\frac{1}{2}\leq\frac{k-1}{k}<1 \text{ and } x>1 \quad\to\quad \frac{1}{x}<x^{-(k-1)/k}\leq \frac{1}{\sqrt{x}}$
$\frac{\ln(x)}{\ln(2)}-1 \leq n= \lfloor {\frac{\ln(x)}{\ln(2)}}\rfloor< \frac{\ln(x)}{\ln(2)} $
$\frac{n-2}{x}\leq \sum_{k=2}^{n-1} x^{-(k-1)/k} <\frac{n-2}{\sqrt{x}} <\frac{n-2}{\sqrt{x}} \quad\to\quad \frac{\left( \frac{\ln(x)}{\ln(2)}-1\right) -2}{x}\leq \sum_{k=2}^{n -1} x^{-(k-1)/k} <\frac{\frac{\ln(x)}{\ln(2)} -2}{\sqrt{x}} $
$$x\to\infty \quad\implies\quad \frac{\ln(x)}{x}\to \text{ and }\frac{\ln(x)}{\sqrt{x}}\to 0\quad\implies\quad \sum_{k=2}^{n -1} x^{-(k-1)/k}\to 0$$
$(\frac{\ln(x)}{\ln(2)}-2)x^{(1/\frac{\ln(x)}{\ln(2)})-1}< (n-1)x^{-(n-1)/n} < (\frac{\ln(x)}{\ln(2)}-1) x^{(1/(\frac{\ln(x)}{\ln(2)}-1))-1}$
$2\frac{\ln(x)-2\ln(2)}{\ln(2)x} < (n-1)x^{-(n-1)/n} < \frac{\ln(x)-\ln(2)}{\ln(2)x}x^{1/((\ln(x)/\ln(2))-1)}$
$x\to\infty \quad\implies\quad 1/(\ln(x)/\ln(2)-1)\to 0 \quad\implies\quad \frac{\ln(x)-\ln(2)}{\ln(2)x}x^{1/((\ln(x)/\ln(2))-1)}\to 0$
$$x\to\infty \quad\implies\quad (n-1)x^{-(n-1)/n}\to 0$$
$$x\to\infty \quad\implies\quad f_n(x)=1+\sum_{k=2}^{n-1} x^{-(k-1)/k}-(n-1) x^{-(n-1)/n}\to 1$$
$$f_n(x)\leq \frac{S(x)}{x}<f_{n+1}(x) \text{ with } f_n(x)\to 1 \:\:\forall n\quad\implies\quad \frac{S(x)}{x}\to 1$$
$$x\to\infty \quad\implies\quad S(x)\sim x$$
