Is ⌊x⌋ defined in terms of repeated square root branch selection:
⌊x⌋=12(∞∑n=−∞+√(x−n)2x−n)−12
Or the arctangent's logarithmic branch selection:
⌊x⌋=x−12−1πtan−1(tan(π(x−12)))
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 ⌊x⌋. 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 √x2x=|x|x, by sgn x={1x≥0,−1x<0. Notice that 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: 12∞∑n=1(sgn(x−n)+sgn(x+n))+12sgn(x)−12. sums to ⌊x⌋ for all x∈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≥0, and define r:=⌊x⌋≥0. Since for any integer k, we have k≤x iff k≤⌊x⌋=r, the nth summand of the series sgn(x−n)+sgn(x+n) vanishes for n≥r+1. On the other hand, for 1≤n≤r, the two terms double up to 2. Plugging in these values, (1) simplifies to: 12r∑n=12+12−12=r=⌊x⌋, and so we are done. (Note that sgnx=1.)
Now consider the case x<0. The trick in this case is to define r:=⌈−x⌉≥0. I leave it as an exercise to verify that ⌊x⌋=−r, in all cases whether or not x is an integer. In this case, the nth summand cancels for n≥r, since x+n≥x+r=x+⌈−x⌉≥x−x=0, whereas x−n is clearly negative. On the other hand, for 1≤n≤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 12r−1∑n=1(−2)+−12−12=−(r−1)−1=−r, which is what we want to show. (Note that sgn x is −1.)
No comments:
Post a Comment