I was supposed to find the definite integral $\int_{0}^{\infty}\lfloor\frac{2}{1+x^2}\rfloor\mathrm dx$ which can done easily by sketching the graph of $y=\frac{2}{1+x^2}$ and comes out to be $1$.
$\int\lfloor\frac{2}{1+x^2}\rfloor\mathrm dx$ where $[.]$ represents the floor function
I was wondering if there is a closed form anti-derivative for the function, by writing the integral as sum of integrals on intervals where the floor function can be removed from the integrand. And if there isn't a closed form, should this be written as a piecewise function with the values in its range being the possible definite integral values it can give on certain intervals. I have no idea how to proceed. Any hints would be appreciated. Thanks