What is the indefinite integral of $\lfloor x^{-1} \rfloor$? I am trying to find the indefinite integral of $\lfloor \frac 1x \rfloor$
My attempt
Please be aware that what comes after this sentence is nothing more than my work. It makes to me, and a lot of it contains made up notations, a lot of which I have made up and are very difficult for me to explain and/or define clearly. If it makes no sense to you, feel free to ask, but since those things are tangential to the question, feel free to also ignore them and refer purely to my above queston.
So, since this is a piecewise constant function, I used the method of jump series to integrate it. I found the implied integral to be $x\lfloor x \rfloor$.
This means that the integral now equals $x\lfloor \frac 1x \rfloor - JS(x \lfloor \frac 1x \rfloor)$
Now, the piecewsie constant component troubles me. Because the function is infinite at 0, I cannot shift all of the disconnected pieces to line up with x = 0 held fixed (physically I mean). That would make the function infinite everywhere. Plus, I am not sure if the integral is divergent. I think the floor chops away enough area to make it finite. However, it throws me off.
Extra question
Assuming that the answerer understands my writing (or at least can understand my progression of computation), could the answerer find and compute JS(x * floor(1/x))? It shouldnt be too hard. (After all, it is just a matter of solving for it in the expression earlier mentioned involving it). If you cannot find it (doesnt reveal itself explicitly) or the weird notation confused you, feel free to ignore this "extra question". Its not relevant to the original question at the very top of this post, and as I said, these later sections pertain to my attempts, not neccessarily the solution that one finds. As they say, more than one way to skin a cat. Dont have to like my method to skin the cat. :p
Definitions (to help clarify things)
Implied Integral: A form of symbolic integration that holds all symbols of the form $\lfloor f(x) \rfloor$ constant. Implied Integration varies by piece-wise constants rather than constants. Eric Stucky more formally defined this concept here (note, I did not write that paper. 'Assistance' is merely credit to me making up this integral.)
Jump Series: The portion of a piece-wise continuous function (bounded or unbounded) that consists purely of jump discontinuities. The Jump Series will be a piece-wise constant function varying by a real number constant. If there is a jump from an infinite value to a finite value that cannot in some way be reduced down, we still consider the Jump Series to be existing, but either 'diverging' or 'unbounded'.
Integration Method of Jump Series: A method of integration where regular integration is split into an implied integral of the function being integrated minus the jump series of the aforementioned implied integral. This method is guaranteed to work so long as the final integral has a closed form. All of the operators involved are guaranteed to exist so long as the original function being integrated exists; however, the degree to which they can be expressed is... unknown.
 A: Well, in fact, your post sounds to me a bit confusing. Let me try to fix some starting points.



*

*As shown in the picture, $1/x - 1 < \left\lfloor {1/x} \right\rfloor  < 1/x$, 
so the integral from $0$ to $1$ is $\infty$.

*$\left\lfloor { - 1/x} \right\rfloor  =  - \left\lceil {1/x} \right\rceil$, so that, apart from  shifting by $1$
and a different definition at the transition points,  the function is almost anti-symmetric, and its integral is diverging also for  $x \to 0^-$. 

*The integral from $a$ ($0<a  \leqslant 1$) to $1$ can be expressed as
$$
\begin{gathered}
  \int_a^1 {\left\lfloor {\frac{1}
{x}} \right\rfloor dx}  = 1\left( {1 - \frac{1}
{2}} \right) + 2\left( {\frac{1}
{2} - \frac{1}
{3}} \right) +  \cdots  + \xi \left( a \right)\left( {\left\lfloor {\frac{1}
{a}} \right\rfloor } \right)\left( {\frac{1}
{{\left\lfloor {1/a} \right\rfloor }} - \frac{1}
{{\left\lfloor {1/a} \right\rfloor  + 1}}} \right) =  \hfill \\
   = \sum\limits_{1\, \leqslant \,k\; \leqslant \,\left\lfloor {1/a} \right\rfloor  - 1} {k\left( {\frac{1}
{k} - \frac{1}
{{k + 1}}} \right)}  + \xi \left( a \right)\left( {\left\lfloor {\frac{1}
{a}} \right\rfloor } \right)\left( {\frac{1}
{{\left\lfloor {1/a} \right\rfloor }} - \frac{1}
{{\left\lfloor {1/a} \right\rfloor  + 1}}} \right) =  \hfill \\
   = \sum\limits_{1\, \leqslant \,k\; \leqslant \,\left\lfloor {1/a} \right\rfloor  - 1} {\frac{1}
{{k + 1}}}  + \xi \left( a \right)\frac{1}
{{\left\lfloor {1/a} \right\rfloor  + 1}} \hfill \\ 
\end{gathered} 
$$
where $\xi \left( a \right)$ is the fraction of the step individuated by $a$, i.e.
$$
\begin{gathered}
  \xi \left( a \right) = \frac{{\frac{1}
{{\left\lfloor {1/a} \right\rfloor }} - a}}
{{\frac{1}
{{\left\lfloor {1/a} \right\rfloor }} - \frac{1}
{{\left\lfloor {1/a} \right\rfloor  + 1}}}} = \frac{{\frac{1}
{{1/a - \left\{ {1/a} \right\}}} - \frac{1}
{{1/a}}}}
{{\frac{1}
{{\left( {1/a - \left\{ {1/a} \right\}} \right)}} - \frac{1}
{{\left( {1/a - \left\{ {1/a} \right\} + 1} \right)}}}} =  \hfill \\
   = \left( {\left( {1 - a\left\{ {1/a} \right\}} \right)\left( {1 + a - a\left\{ {1/a} \right\}} \right)} \right)\frac{{\left\{ {1/a} \right\}}}
{{\left( {1 - a\left\{ {1/a} \right\}} \right)}} =  \hfill \\
   = \left( {1 + a - a\left\{ {1/a} \right\}} \right)\left\{ {1/a} \right\} \hfill \\ 
\end{gathered} 
$$  


So that finally

$$
\begin{gathered}
  \int_a^1 {\left\lfloor {\frac{1}
{x}} \right\rfloor dx}  = \int_a^\infty  {\left\lfloor {\frac{1}
{x}} \right\rfloor dx} \quad \left| {\;0 < a} \right.\quad  =  \hfill \\
   = \sum\limits_{1\, \leqslant \,k\; \leqslant \,\left\lfloor {1/a} \right\rfloor  - 1} {\frac{1}
{{k + 1}}}  + 1 - a\left\lfloor {1/a} \right\rfloor  = \sum\limits_{0\, \leqslant \,k\; \leqslant \,\left\lfloor {1/a} \right\rfloor  - 1} {\frac{1}
{{k + 1}}}  - a\left\lfloor {1/a} \right\rfloor  =  \hfill \\
   = H\left( {\left\lfloor {1/a} \right\rfloor } \right) - a\left\lfloor {1/a} \right\rfloor  \hfill \\ 
\end{gathered} 
$$

A: if $u = \frac 1 x$, then $x = \frac 1 u$, so $dx = -\frac {du}{u^2}$, and the integral becomes
$$\int \left\lfloor \frac 1 x \right\rfloor\ dx = -\int \frac {\lfloor u \rfloor du}{u^2}$$
To tie the various pieces together cohesively, switch to a definite integral from $u = 0$:
$$F(u) = -\int_0^u \frac {\lfloor t \rfloor dt}{t^2}$$
Now for $t \in [n, n + 1)$ for integer $n \ge 0$, $\lfloor t \rfloor = n$, so the integral reduces to $$-n\int \frac{dt}{t^2} = \frac n t + C$$
and therefore $$\int_{n-1}^n \frac {\lfloor t \rfloor dt}{t^2} = \frac 1 n$$
Thus
$$F(u) = \sum_{n=1}^{\lfloor u \rfloor} \frac 1 n + \int_{\lfloor u \rfloor}^u \frac {\lfloor t \rfloor dt}{t^2}dt = -\left(H(\lfloor u \rfloor) + \frac {\lfloor u \rfloor}{u} - 1\right)$$
where $H(n)$ is the sum of the first $n$ terms of the harmonic series ($H(0) = 0$).
So my claim is that for $x > 0$, $$\int \left\lfloor \frac 1 x \right\rfloor\ dx = -x\left\lfloor \frac 1 x \right\rfloor - H\left(\left\lfloor \frac 1 x \right\rfloor\right) + C$$
Let's test that. Now for $x > 1$ the integrand is $0$ and my antiderivative is constant, so it works where things aren't interesting. For $x < 1$, by my formula we should have $$\int_{\frac 1 n}^1 \left\lfloor \frac 1 x \right\rfloor\ dx = \left(\frac 1 n\lfloor n \rfloor + H(n)\right) - (1\lfloor 1 \rfloor + H(1)) = H(n) - 1$$
By a more direct calculation: $$\begin{align}\int_{\frac 1 n}^1 \left\lfloor \frac 1 x \right\rfloor\ dx &= \sum_{k = 1}^{n-1} \int_\frac 1 {k + 1}^\frac 1 k \left\lfloor \frac 1 x \right\rfloor\ dx \\&= \sum_{k = 1}^{n-1} \int_\frac 1 {k + 1}^\frac 1 k k\ dx \\&= \sum_{k = 1}^{n-1} k\left(\frac 1 k - \frac 1 {k+1}\right) \\&= \sum_{k = 1}^{n-1} \frac 1 {k+1} \\&= H(n) - 1\end{align}$$
Between inverses of integers, the integrand is constant, so it's antiderivative is going to be that constant times $x$ plus a constant, just as I gave. I.e., my antiderivative works.
Now this is only for $x > 0$. Note that as $x \to 0+$, the antiderivative rises to $\infty$. This breaks the whole matter up. On the negative side, you will get a different (but very similar) antiderivative. I'll leave it to you to figure out what the differences are. Because of the singularity at $x = 0$, you cannot have an indefinite integral that works over the entire real line, or even the entire real line except $0$, at least as far for calculating integrals: if $a < 0$ and $b > 0$, then
$$\int_a^b \left\lfloor \frac 1 x \right\rfloor\ dx$$ does not converge, so there is no function $f$ where it will be equal to $f(b) - f(a)$.
