Existence of surjective continuous function $f:[0,1)\to\mathbb{R}$

calculusreal-analysis

Prove or disprove whether there exists a surjective continuous function $f:[0,1)\to\mathbb{R}$.

Intuitively, I would say no, since such a function would have to increase unboundedly and decrease unboundedly at the same time for $x\to1$ but I'm having a hard time actually proving this.

Best Answer

There is such a function. Consider $g:[0,+\infty)\rightarrow \mathbb{R}$ given by formula $$g(x) = x\cdot \sin(x)$$ Then consider any continuous bijection $h:[0,1)\rightarrow [0,+\infty)$. For instance take $$h(x) = \frac{x}{1-x}$$ Define $f = g\cdot h$.

Remark.

There are no such $f$ which are bijective. Indeed, suppose that such function exists. Let $f(0) = r\in \mathbb{R}$. Then $$f(\left(0,1)\right) = \mathbb{R}\setminus \{r\}$$ is a continuous image of a connected space. Hence it is connected. But clearly $\mathbb{R}\setminus \{r\}$ is disconnected. This is a contradiction.