Take the 2-minute tour ×

I want to prove the following nice statement I've found:

A function $f: [0,1] \rightarrow \mathbb{R}$ takes every function value twice - proof it is not continuous

I've already found an answer to my question but one thing is still not clear to my mind. The answer I found was here on math.StackExchange posted by Arthur:

Whole post:

"Assume that you have a function $f$ that does take every real value exactly twice. Let $f(a) = f(b) = 0$ with $a < b$. Let $c \in (a,b)$ be given, and assume without loss of generality $f(c) > 0$. Then for every $0 < \epsilon < f(c)$ there exist $d \in (a,c)$ and $e \in (c,b)$ such that $f(d) = f(e) = \epsilon$. So on the intervals $[0,a)$ and $(b,1]$ our function cannot go any higher than zero. That means that $f$ should take every positive real value on the interval $[a,b]$. However the restriction of $f$ to $[a,b]$ is continuous from a closed interval to $\mathbb{R}$ and thus bounded. Contradiction."

Now everything is clear here except for:


Well I think know what Arthur is telling there: Because of the boundary there is always at least one function value that can't be taken twice by the function, e.g. just like the peak of $-x^2$.

But that is exactly where I was stuck before I started researching that issue. Is it really possible to just say it the way Arthur did? I thought that I'd have to further somehow prove the statement that boundary leads to that contradiction.

I hope that it is clear what I was trying to express here...

Anyways as always - thank you for your help!


share|improve this question
The question that you link to is completely different $-$ the domain is the whole of $\mathbb R$, and the range is also the whole of $\mathbb R$. –  TonyK Jan 26 '14 at 23:14
Hmm yes that is true - but I thought that the answer is adaptable to my own problem by just changing ranges a little bit isn't it? –  FunkyPeanut Jan 26 '14 at 23:21
Here, "function value" must mean "value in the range of $f$", and not "value in $\mathbb R$" (because a continuous function on $[0,1]$ is bounded). So the two problems are not equivalent. –  TonyK Jan 26 '14 at 23:27
Yes, your interpretation is correct and I agree with you that the problems are not equivalent. I really thought that these two problems are adaptable by just changing the ranges of $f$. Thus I would like to ask you whether that is so and if not what exactly I would have to change then. Thank you very much for your patience :) –  FunkyPeanut Jan 26 '14 at 23:33
You can't use the other problem to help you solve this one. –  TonyK Jan 26 '14 at 23:34

3 Answers 3

up vote 2 down vote accepted

The maximum value theorem says every continuous function on a closed bounded interval assumes a maximum value. That would mean the function never goes above that value in that interval. Thus your function $f$ would never assume any values higher than $\max\{ f(x) : a\le x \le b\}$, contradicting the assumption that it assumes every such value twice.

share|improve this answer
Ah okay - that makes it really clear to me. Thank you very much! –  FunkyPeanut Jan 26 '14 at 23:23

The statement of the problem and the other answers given are completely unrelated. If the function is from $[0,1]$ to $\mathbb{R}$, it cannot take each real value even once, since it has to be bounded (i.e. continuous functions map closed intervals to closed intervals).

However, the statement is about showing a function cannot take each value on its image (which if its continuous, is a closed interval) exactly twice. We then have to show a 2 to 1 function is not continuous. As a matter of fact, such functions have an infinite number of discontinuities, as discussed here real analysis function takes on each value twice? and here http://www.ams.org/journals/proc/1986-098-02/S0002-9939-1986-0854049-8/S0002-9939-1986-0854049-8.pdf

I reproduce an answer to that question which has an example:

Let $x_\alpha$ be a well-ordering of $[0,1]$.

For any ordinal $\alpha = \theta + n < \frak{c}$ where $\theta$ is a limit ordinal or $0$ and $n$ is a finite ordinal, let $F(\theta + n > \cdot 2) = F(\theta + n \cdot 2 + 1) = x_\alpha$.

Now define $f(x_\alpha) = F(\alpha)$ for all $\alpha \lt \frak{c}$ and it is clear that $f$ has the required property.

If we do not require the function to take each value exactly twice, then the statement is false, and there are many simple continuous functions that satisfy the conditions.

share|improve this answer

The contradiction follows from the fact that every real-valued function whose domain is a closed and bounded interval (i.e. of the form $[a,b]$) is bounded. If $f$ is bounded on $[a,b]$ then there is some positive real number $K$ such that $f(x) < K$ for all $x \in [a,b]$. But then $K$ is a (real) value that $f$ doesn't take, contradicting the hypothesis that it takes every real value on $[a,b]$.

share|improve this answer
I think that the problem should be interpreted as $f$ taking every value exactly twice in its range (i.e., in $f([0,1])$), and not in its codomain (i.e., $\mathbb R$); though Arthur's answer, as reported by the OP, definitely supports your interpretation. –  triple_sec Jan 26 '14 at 23:20

Your Answer


