3

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.

user64742
  • 2,195
  • FYI - your phrase "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" is an immediate red flag telling people "I am going to make you guess what I'm thinking because I'm too lazy to explain it". I imagine that a great many people stopped reading your post right there. Which is too bad, because the only made-up notation I see is $JS(...)$, whose general meaning is obvious, though I've never heard of the "method of jump series" before. – Paul Sinclair Sep 26 '16 at 23:45
  • $x\lfloor \frac 1 x \rfloor$ is not infinite at $0$. It is undefined there, which is not the same thing. In fact, when $\frac 1 x \in [n, n+1)$, it is easy to see that $\frac n{n+1} < x\lfloor \frac 1 x \rfloor \le 1$. Therefore $$\lim_{x\to 0+} x\left\lfloor \frac 1 x \right\rfloor = 1$$ – Paul Sinclair Sep 26 '16 at 23:53
  • Something that may be helpful: make the substitution $u = 1/x$ in your indefinite integral. The $u$ integral may be less confusing to think about. – Paul Sinclair Sep 26 '16 at 23:58
  • There's also the implied integral. And I gave up trying to explain them. Every time I attempt to describe them (even if it is not directly relevant to the question) results in my question being "flagged for not being clear". So at this point, I give up trying to. I might edit the question to add those definitions. But that statement serves as protection for me. If anyone tries to flag it as unclear or whatever, anyone with two cents will say "well... they told you that part is potentially unclear and to ignore it if it is". I know it's weird, and I know it's annoying. But I kinda have to IMO. – user64742 Sep 27 '16 at 03:36
  • Also worth noting, doing a u substitution would be great... but I'm pretty sure that only applies to continuous functions. I may be wrong. If so, that opens a lot of doors in my studies of these functions. It might actually simplify a lot of integration formulae I have written (this being one of the few I cannot seem to solve sadly enough). – user64742 Sep 27 '16 at 03:38
  • You are wrong. it is sufficient for $u$ to be a piecewise differentiable function of $x$, so $u = 1/x$ certainly qualifies. The functions of $x$ and $u$ being integrated do not need to be continuous, just integrable. $x=0$ itself presents a small difficulty, but you can find separate antiderivatives on either side, which can be stitched together to make antiderivatives for the whole. – Paul Sinclair Sep 27 '16 at 23:19
  • No, I mean that floor is discontinuous. I care little about the discontinuity of 1/x. Also, there is no accompanying du, so letting 1/x = u is absolutely meaningless. Plus, I did not ask to know how to integrate this function, so much as I asked what the indefinite integral is over all real numbers. I would like to know how you do it of course, but my issue stems from the fact that this particular piecewise continuous function if causing me trouble. – user64742 Sep 28 '16 at 01:10
  • I already said in the previous comment that continuity of the floor function is NOT required to do a substitution. And I assumed you knew how to do substitutions, but that "no accompanying $du$" remark leaves me greatly in doubt. If you need walked through the steps of doing a substitution, in particular how to express $dx$ in terms of $u$ and $du$, then you should set this aside until you have mastered the basic skills. Also asking "what the indefinite integral is" IS asking "how to integrate this function". (Or are you saying you wanted it handed to you, not told how to find it yourself?) – Paul Sinclair Sep 28 '16 at 15:11
  • Sir, I know how to do substitutions. What I'm saying is that if 1/x = u then -dx/x^2 = du and then dx = -x^2du... Clearly a simple u-substitution doesn't work in this case. If you mean integration by parts, then perhaps it could done but I highly doubt it. Also, considering you wrote this as answer I would think you would be more than willing to explain how you intend your substitution to work. At this point, I see no regular u-substitution that works by letting u = 1/x. Also, excuse me if I question whether u-subs work on discontinuous functions. Chain rule only applies when continuous, so... – user64742 Sep 28 '16 at 21:36
  • I'd imagine the same would be true for a substitution method intending to reverse the chain rule. – user64742 Sep 28 '16 at 21:37

2 Answers2

1

Well, in fact, your post sounds to me a bit confusing. Let me try to fix some starting points. floor(1sux)

  • 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} $$

G Cab
  • 35,964
1

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)$.

Paul Sinclair
  • 45,932
  • Brilliant substitution. +1. Next time maybe saying let x = 1/u would make more sense, lol. The fact that you indicated the chain rule for these is pretty interesting though as well. For some reason I thought the Professor way back when said "only for continuous functions". Meh, they make a lot of weird restrictions no reasons in undergrad (I keep having to remember to ignore them). They probably just said that so people didn't do stupid things. – user64742 Sep 29 '16 at 02:26
  • Also, btw. The integral of floor is well known to me times any arbitrary function. If you want I can demonstrate that? – user64742 Sep 29 '16 at 02:28
  • What your professor was saying is that the particular theorem given was proved for continuous functions (a common proof for early calc courses and the Riemann integral). But that was a "sufficient" requirement, not a "necessary" one. In fact, you have to get inventive to come up with an integrand for which a differentiable $u$-substitution fails. So for specific cases such as this, it is often better to ignore the requirements and pretend it will work. Then when you have the solution, check it as I did here. – Paul Sinclair Sep 29 '16 at 17:11
  • Actually, I could have produced the result more easily without the substitution by following the same calculation path I did in checking the result at the end. But I wanted to show how the substitution method worked, since we were clearly talking past each other in the comments on your OP. – Paul Sinclair Sep 29 '16 at 17:15
  • Yeah, I see how the substitution worked. Granted, I went on a different path. I ended up with floor(u)/u - H(floor(u)). Regardless of divergence, such a method fails purely because the partial sum of the harmonic series *has no closed form*. – user64742 Sep 29 '16 at 19:31
  • Also, the integral should be some kind of polygonal curve following the path of ln(x). However, that curve must not have a closed form I guess. – user64742 Sep 29 '16 at 19:55