Can everywhere discontinuous function map every non-empty open interval $I$ onto itself

continuityreal-analysis

It is written on Wikipedia:

A strongly Darboux function is one for which the image of every (non-empty) open interval is the whole real line. Such functions exist and are Darboux but nowhere continuous.

An example of such a function is Conway base 13 function.

So, I was thinking that maybe there are everywhere discontinuous functions that map every non-empty open interval onto itself?

I think that I am missing something simple here.

I thought on taking as a starting point the function $f(x)=x$. This one clearly sends every non-empty open interval onto itself. Now, I am not sure on how to "shuffle" values on every interval so to make it everywhere discontinuous.

If we define $f(x)$ to be equal to $x$ at all rational values then only the values at irrational points need to be shuffled, or, what may be even easier, we can define $f(x)$ to be equal to $x$ at all irrational values and shuffle its values at the rational points.

However, I am not sure how to do that, and more experienced users know better, so, how to do it (if possible)?

Best Answer

Suppose $f:\mathbb R\to \mathbb R$ is such that $f(I)=I$ for every nonempty open interval $I.$ Let $x\in \mathbb R.$ Then $f((x-1,x+1))$ contains $x.$ But $f((x-1,x))$ and $f((x,x+1))$ are $(x-1,x)$ and $(x,x+1)$ respectively, hence don't contain $x.$ Therefore $f(x)=x$ is the only possibility. Since $x$ is arbitrary, $f(x)=x$ everywhere.

Related Question