Integral of a floor function.

ceiling-and-floor-functionsdefinite integralsintegration

Well, i was trying to solve this problem, this told me find the integral
\begin{equation}
\int_{0}^{2}f(x)dx
\end{equation}

with $$ x \in <0, \infty>$$
of this funtion:
\begin{equation}
f(x) =\left \{ \begin{matrix} \frac{1}{\lfloor{\frac{1}{x}}\rfloor} & \mbox{if } 0 < x < 1
\\ 0 & \mbox{if } x = 0 \mbox{ or } x > 1\end{matrix}\right.
\\
\end{equation}

how i can see, just i have to solve in the intervalue [0,1]. $$\\$$
I tried it, first I thought in make a change of variable, so i had
\begin{equation}
\lfloor{\frac{1}{x}}\rfloor = y ,
\end{equation}

But i knew that derivate of floor funtion is zero because it is constant in the intervalue, then i thought this wouldn't get my anywhere. $$\\$$
After that i study if this funtion could be integrable, but i really can´t get it. So i am blanking.

Best Answer

Observe that when we only substitute $\frac{1}{x} = y$

$$I = \int_1^\infty \frac{dy}{\lfloor y\rfloor y^2} = \sum_{n=1}^\infty \frac{1}{n}\int_n^{n+1}\frac{dy}{y^2}$$

$$ = \sum_{n=1}^\infty \frac{1}{n^2} - \sum_{n=1}^\infty \frac{1}{n} - \frac{1}{n+1} = \frac{\pi^2}{6} - 1$$

Related Question