# Is the use of $\lfloor x\rfloor$ legitimate to correct discontinuities?

Is the use of $\lfloor x\rfloor$ legitimate to correct discontinuities?

In functions like $\tan^{-1}(a \tan(x))$, the angle wraps and the result is discontinuous.

Is it legitimate to redefine the equation as in $\tan(a \tan^{-1}(x)) + \pi\lfloor \pi x + \frac{1}{2} \rfloor \mathop{\rm sgn}(a)$ to keep it continuous? Or is it better to write it $\tan(a \tan^{-1}(x)) + (x - \tan^{-1}(\tan(x))) \mathop{\rm sgn}(a)$, or some other way–or should this never be corrected in the first place?

I realize this example is rather trivial due to the multivalued nature of the arctangent. Here is one that is not so trivial: the arc length of the cycloid.

Unless I'm missing something, the problem with simply calculating integral for the arc length $\int \sqrt{2 - 2\cos(t)} dt = 2 \int |\sin(\frac{t}{2})| dt = 4-4\cos(\frac{t}{2})\mathop{\rm sgn}(\sin(\frac{t}{2}))$ is that it jumps back down to zero every $2\pi$. This could be corrected in one of the above ways. If left alone it is simply incorrect except in $0 < t < 2\pi$.

Now Wolfram|Alpha gives a terribly convoluted function for it. How did W|A redefine the process to come out correct for all $t$ (not to mention so convoluted)? Is this more natural or otherwise more legitimate than simply adding a floor function to it?

In other words: is there a mathematical reason to prefer one method over another?

-
(I do not really know what to tag this as.) –  jnm2 Sep 7 '11 at 15:04
You might also be interested in this blog entry, which was written by an m.SE member... –  Ｊ. Ｍ. Sep 7 '11 at 15:09
Note also the expression for a cycloid's arclength (formula 5) in this MathWorld entry. –  Ｊ. Ｍ. Sep 7 '11 at 15:11
@J.M. Yes, very interested. –  jnm2 Sep 7 '11 at 16:36

Discontinuities of the anti-derivative make application of the fundamental theorem of calculus difficult. One needs to identify those discontinuities and correct for the jumps. It is therefore very tempting to figure out if an anti-derivative continuous, say along the real axis, can be constructed. See article of D. Jeffrey and A. Rich in this direction.

In order to make an anti-derivative continuous one uses a freedom to add a piece-wise constant term, and crafts it as needed. Since $\lfloor x\rfloor$ is a piece-wise constant it is OK to use it. For the integral at hand:

$$\int \sqrt{2 - 2\cos(t)} dt = 4 \left( 1 - \cos\left( \frac{t}{2}\right) \operatorname{sign}\left( \sin \frac{t}{2} \right) \right) + 8 \left\lfloor \frac{t}{2 \pi}\right\rfloor$$ Here is W|A page of the plot of this expression.

Wolfram|Alpha came up with a different and more complicated expression for the piece-wise constant for your integral.

-
Another related article. –  Ｊ. Ｍ. Sep 22 '11 at 2:54

At least for $\arctan(a\tan\,x)$, one can build a modification of the function that does not have jump discontinuities. The route is to use, instead of the floor function, the function

$$x-\arctan\tan\,x$$

which is also piecewise constant:

The function we need is thus

$$x+\arctan(a\tan\,x)-\arctan(\tan\,x)$$

The nice thing about this is that we can use the formula for the difference of two tangents to simplify this function somewhat:

\begin{align*} x+\arctan(a\tan\,x)-\arctan(\tan\,x)&=x+\arctan\left(\frac{a\tan\,x-\tan\,x}{1+a\tan^2 x}\right)\\ &=x+\arctan\left(\frac{(a-1)\sin\,x\cos\,x}{\cos^2 x+a\sin^2 x}\right)\\ &=x+\arctan\left(\frac{\frac12(a-1)\sin\,2x}{\frac12(1+\cos\,2x)+\frac{a}2(1-\cos\,2x)}\right)\\ &=x-\arctan\left(\frac{(1-a)\sin\,2x}{1+a+(1-a)\cos\,2x}\right) \end{align*}

Compare the functions $\color{#3f3d99}{x-\arctan\left(\dfrac{(1-a)\sin\,2x}{1+a+(1-a)\cos\,2x}\right)}$ and $\color{#993d71}{\arctan(a\tan\,x)}$ (for $a=2/3$):

A similar procedure can be done for the antiderivatives of certain rational functions of sine and cosine, as in this answer.

-