How to integrate the following floor function? I need to calculate the following integral,
$$\int_{1}^{10}\frac{x-\lfloor x \rfloor }{x^2} dx$$.
So I did this-
$$\int_{1}^{10}\frac{x-\lfloor x \rfloor }{x^2} dx=\int_{1}^{10}\frac{1 }{x} dx-\int_{1}^{10}\frac{\lfloor x \rfloor}{x^2}dx.$$ Now my problem is with the second integral. How can I calculate this? I have tried to looking for examples here but in all those example there only the floor function is involved not a denominator part as I have. So how can I do this? Please help.

You need to compute integrals of the form $\displaystyle \int_n^{n+1} \dfrac{\lfloor x \rfloor}{x^2} dx$.
You get
\begin{align}
    \int_n^{n+1} \dfrac{\lfloor x \rfloor}{x^2} dx
    &= \int_n^{n+1} \dfrac{n}{x^2} dx \\
    &= \left. \dfrac{-n}{x} \right|_n^{n+1}\\
    &= \dfrac{-n}{n+1} + 1\\
    &= \dfrac{1}{n+1}
\end{align}
Then 
$\displaystyle \int_1^{10} \dfrac{\lfloor x \rfloor}{x^2}dx
= \int_1^2 \dfrac{\lfloor x \rfloor}{x^2}dx +
\int_2^3 \dfrac{\lfloor x \rfloor}{x^2}dx + \cdots +
\int_9^{10} \dfrac{\lfloor x \rfloor}{x^2}dx$
and so on.
