Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
(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... – J. M. Sep 7 '11 at 15:09
Note also the expression for a cycloid's arclength (formula 5) in this MathWorld entry. – J. M. Sep 7 '11 at 15:11
@J.M. Yes, very interested. – jnm2 Sep 7 '11 at 16:36
up vote 6 down vote accepted

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.

share|cite|improve this answer
Another related article. – J. M. Sep 22 '11 at 2:54
Just an interesting mention. A piecewise comstant function added to a discontinuous function in order to render it continuous is referred to as a jump series. +1 for doing such an out of the box method! – TheGreatDuck Jun 16 at 23:04

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


which is also piecewise constant:

plot of x-\arctan\tan\,x

The function we need is thus


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

\arctan(a\tan\,x) and its continuous modification

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

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.