Finding a continuous function $f: \mathbb{R} \to \mathbb{R}$ such that $f(\mathbb{R})$ is neither open nor closed Find a bounded, continuous function $f: \mathbb{R} \to \mathbb{R}$ such that $f(\mathbb{R})$ is neither open nor closed?

Take $f(x) = \arctan(x^2)$. Then, $f(\mathbb{R}) = [0, \pi/2)$.
