I am stuck on the following problem:
Let $f :\mathbb R \to \mathbb R$ be a function such that $f$ is not bounded above nor bounded below. Show that if $f$ is continuous on $\mathbb R$ then the image of $f$ is $\mathbb R$.
I'm not sure how to exactly approach this problem, especially because it's so intuitive. I know you have to use the Intermediate Value Theorem.
Hint: for each $M>0$, there exist $x_1, x_2$ such that $f(x_1)>M$ and $f(x_2) < -M$. What does that tell you about $[-M, M]$?