Tuesday, November 19, 2019

algebra precalculus - Is $lfloor xrfloor$ defined in terms of $|x|$ and branch selection?


Is $\lfloor x\rfloor$ defined in terms of repeated square root branch selection:


$$\lfloor x\rfloor = \frac{1}{2}\left(\sum_{n=-\infty}^\infty\frac{+\sqrt{(x-n)^2}}{x-n} \right) - \frac1{2}$$


Or the arctangent's logarithmic branch selection:


$$\lfloor x\rfloor = x - \frac1{2}-\frac1{\pi}\tan^{-1}\left(\tan\left(\pi(x - \frac1{2})\right)\right)$$


Or both, or something else?



Answer



First of all, I emphasize that neither is a definition of the floor function found in any standard text or paper. This obfuscation seems like an attempt to create an "algebraic" formula to express $\lfloor x \rfloor$. Let me play along anyway.


Since Yuval already explained the second formula, I will restrict to the first. However, I will modify it slightly to make the expression even meaningful. First, let us replace $$ \frac{\sqrt{x^2}}{x} = \frac{|x|}{x}, $$ by $$ \mathrm{sgn} \ x = \begin{cases} 1 & x \geq 0, \\ -1 & x < 0. \end{cases} $$ Notice that $\mathrm{sgn}\ 0$ is arbitrarily defined as $1$. Further, we will modify the right hand by grouping the positive and negative terms together. That is, we want to prove that the expression: $$ \frac{1}{2}\sum_{n=1}^{\infty} (\mathrm{sgn} (x-n) + \mathrm{sgn} (x+n)) + \frac{1}{2}\mathrm{sgn} (x) - \frac{1}{2}. \tag{1} $$ sums to $\lfloor x \rfloor$ for all $x \in \mathbb R$. (Convince yourself that I have included all the terms in the above formula.) The reason for pairing up the terms like this is that the original series had obvious convergence issues; in contrast, for any real $x$ all but finitely many terms of the modified series vanish.


First of all, suppose $x \geq 0$, and define $r := \lfloor x \rfloor \geq 0$. Since for any integer $k$, we have $k \leq x$ iff $k \leq \lfloor x \rfloor = r$, the $n$th summand of the series $\mathrm{sgn}(x-n) + \mathrm{sgn}(x+n)$ vanishes for $n \geq r+1$. On the other hand, for $1 \leq n \leq r$, the two terms double up to $2$. Plugging in these values, $(1)$ simplifies to: $$ \frac{1}{2} \sum_{n=1}^{r} 2 + \frac{1}{2} - \frac{1}{2} = r = \lfloor x \rfloor, $$ and so we are done. (Note that $\mathrm{sgn} x = 1$.)


Now consider the case $x < 0$. The trick in this case is to define $r := \lceil -x \rceil \geq 0$. I leave it as an exercise to verify that $\lfloor x \rfloor = -r$, in all cases whether or not $x$ is an integer. In this case, the $n$th summand cancels for $n \geq r$, since $x+n \geq x + r = x + \lceil -x \rceil \geq x -x = 0$, whereas $x-n$ is clearly negative. On the other hand, for $1 \leq n \leq r-1$, we have $x + n < 0$ (following a similar argument as above). So in this range the two terms double up to $-2$. Substituting these values, $(1)$ simplifies to $$ \frac{1}{2}\sum_{n=1}^{r-1} (-2) + \frac{-1}{2} - \frac{1}{2} = -(r-1) -1 = -r, $$ which is what we want to show. (Note that $\mathrm{sgn} \ x$ is $-1$.)


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...