[Math] Intermediate value theorem – show $ f (\mathbb{R} )=\mathbb{R} $.

continuityfunctionsreal-analysis

If $f:\mathbb{R} \rightarrow \mathbb{R} $ is continuous over the entire domain Ms is not bounded above or below, show that $f(\mathbb{R} )= \mathbb{R}. $

My approach would be to say that since $f$ is continuous on $\mathbb{R}$ it must be continuous on $[a,b], \ a, b \in \mathbb{R} $ and using the intermediate value theorem this tells us that $f$ must take every value between $f(a)$ and $f(b).$ Now I want to argue that we can make this closed bounded interval as large as we want and the result still holds and I want to show that this implies that we can make the values of $f(a)$ as small as we like and $f(b)$ as large as we like (or the other way round) since $f$ is neither bounded below or above but I'm not sure if this argument can used to show that the image of $f$ is $\mathbb{R} $ since we switch from closed bounded intervals to an unbounded interval.

Does my argument hold to show the result?

Best Answer

A little bit cleaner argument:

Suppose $c\in\mathbb R$. We will show that there exists $x\in\mathbb R$ with $f(x)=c$

$f$ is not bounded below, so there exists $a\in\mathbb R$ such that $f(a)<c$

$f$ is not bounded above, so there exists $b\in\mathbb R$ such that $f(b)>c$

Now $f$ is continuous on $[a,b]$ (or $[b,a]$ if $b<a$) and $c\in(f(a),f(b))$, so by intermediate value property there exists $x\in(a,b)$ (or $(b,a)$) with $f(x)=c$

Related Question