Give an example of a real valued function on $[0,1]$ satisfying the following property.

1k Views Asked by At

My whole question looks like-
Give an example of a real valued function $f:[0,1]\to\Bbb{R}$ which satisfies the following property-
For each $y\in\Bbb{R}$ either there is no $x\in[0,1]$ such that $f(x)=y$ or there is exactly two points(say $x_1, x_2$) such that $f(x_1)=f(x_2)=y$.
Can anybody give such example? Thanks in advance.

1

There are 1 best solutions below

2
On

If $f$ is not assumed to be continuous then the answer is yes. You could start this by defining a bijection between $[0,\frac{1}{2}]$ and $(\frac{1}{2},1]$ as indicated in this answer.

If $f$ is continuous then the answer is "no, such a counterexample cannot exist."

By the extreme value theorem, $f$ attains its maximum. Call the two points which attain the maximum $x=a,b$. Then again by EVT, $f|_{[a,b]}$ attains its minimum on $[a,b]$, call it $m$. It is achieved at some $x=c,d$ satisfying $$ a<c<d<b. $$

Once more by the EVT, $f|_{[c,d]}$ attains its maximum, call it $M$, on $[c,d]$.

Now (you can show) by the intermediate value theorem, the value $\frac{m+M}{2}$ is attained at least four times on $[0,1]$, a contradiction. And if any of this unclear try drawing pictures of $a, b$, etc.