# Computing integral with floor function

Question

Find the exact value of $$\int_{1}^{2016}\frac {\lfloor \ln x \rfloor} {x}\ \mathrm{d}x\ .$$

My working

My intuition is to treat the integral without the floor function and integrate, then "put back" the floor function after, so $$\int_{1}^{2016}\frac {\lfloor \ln x \rfloor} {x}\ \mathrm{d}x = \frac 1 2 [(\lfloor \ln x \rfloor)^2]^{x = 2016}_{x = 1}\ .$$

May I know if my intuition is correct? If not, what would be the right way to do this? This is my first time encountering an integral with the floor function. Any help/suggestions would be greatly appreciated :)

• Well, one thing which strikes me at first for solving this would be as follows. ln1=0, ln2016 = 7.6 (approx). there would be points along the x axis where the floor function is discontinuous. Break your integral about those points Nov 15, 2020 at 7:47

This is a plot of floor(ln(x)) along x axis.Find these points of discontinuity and break your integral at these points. The the numerator in all of these sub parts will be a constant and you will have just $$\frac{some-constant}{x}$$ as the integrand.
• @nicomezi $\int^{2016}_1 \frac {\lfloor \ln x \rfloor} {x}\ \mathrm{d}x = \int^{e^1}_{e^0} \frac 0 x\ \mathrm{d}x + \int^{e^2}_{e^1} \frac 1 x\ \mathrm{d}x + \ldots + \int^{e^7}_{e^6} \frac 6 x\ \mathrm{d}x + \int^{2016}_{e^7} \frac 7 x\ \mathrm{d}x$. The "pattern" can actually be generalised to any integral involving a floor function. I hope this satisfies your curiosity! Jan 20, 2021 at 18:32