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

Suppose $$f(x)=\left|x-2\left\lfloor\frac{x+1}{2}\right\rfloor\right|$$ To prove the continuity of $f$ in $\mathbb {R}$ we have to prove it first in $\mathbb {Z}$ then at $\mathbb{R} - \mathbb{Z}$. But why do we have to prove the continuity if $x=2n$ and $x=2n-1$ ($n \in \mathbb {N}$ odd or even) when we want to prove the continuity in $\mathbb {Z}$? (I saw this in a solution but I didn't understand it)

share|cite|improve this question

Presumably, the solution that you read thought that the best way to show continuity for all integers was to to it in two cases: when we have odd integers and when we have even integers.

To show that the function is continuous at all integers is equivalent to showing that it's continuous at both the even and odd integers.

share|cite|improve this answer

If you try to draw a graph of this function, you'll see why it's necessary to deal with even and odd numbers separately. Basically, it's a kind of zigzag - at each integer, it has a sharp tooth. Its continuity away from the integers is never in any doubt; but the reason why it's continuous at the upward-pointing teeth (odd integers) is completely different from the reason why it's continuous at the downward-pointing teeth (even integers). It would be disproportionately difficult to try and give a continuity proof that works for all integers, without splitting them into the two separate cases.

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.