0

Problem: $f$ is a function from $\mathbb{R}$ to $\mathbb{R}$, here $\mathbb{R}$ is the set of real numbers. $f$ cannot be continuous if $f$ takes every value exactly twice.

Now this question is really old and asked many times before on stackexchange. But every solution is by crude manipulation. I want to know if there exists an insightful solution of this.

My problem: I have solved the problem before like this, first assume the function is continuous and then by applying intermediate value property lead to some contradiction. But if the problem is a more general one, like if the function takes every value thrice, the same argument works, but the solution becomes lengthier. That's why I am asking for some more nice solution, may be using some advanced tools.

1 Answers1

0

Whether this offers any insight, or is simply more crude manipulation, I leave to the reader:

If $f$ attains each value exactly twice, then $f(a)=f(b)=0$ for some values $a\lt b$ and for no other value of $x$. By the Intermediate Value Theorem, $f$ does not change sign in the interval $(a,b)$ (otherwise it would have an additional zero), so without loss of generality (replacing $f$ with $-f$ if necessary) we can assume $f(x)\gt0$ for $x\in(a,b)$. Let $f$ attain its maximum value at $c\in(a,b)$, say $f(c)=M\gt0$. By IVT (again), $f$ takes each value in $(0,M)$ at least once in $(a,c)$ and at least once in $(c,b)$, hence takes each value in $(0,M)$ exactly once in $(a,c)$ and exactly once in $(c,b)$, and nowhere else. This implies $f$ is strictly negative for $x\lt a$ and $x\gt b$. But this means $f$ never attains any value greater than $M$, much less attaining those values twice.

Remark: I am assuming that the condition "$f$ takes every value exactly twice" means that every $y\in\mathbb{R}$ is to be attained exactly twice, not just every $y$ in the range of $f$. This distinguishes the problem here from the proposed duplicates, where the domain of $f$ is a closed interval, and is what allows for what I think is a fairly simple proof.

Barry Cipra
  • 81,321