Continuous function does not map closed set to closed set I have a question in my textbook ask me to use this function $f(x)=x^2/(1+x^2)$ to show that continuous function does not necessarily map a closed set to a closed set.
But I can't find any example to show a closed set map to an open set using this function f.
Is this question wrong? Or am I overlook something?
 A: image of the close set $[1, \infty)$ in $\mathbb{R}$ is $[1/2,1)$ which is not a close set.
A: Not an answer, but too long for a comment.
Note that in each of the answers given, the closed set in the domain has been "large": either $\mathbb{R}$ or $[1, \infty)$ in the answers so far. What about "small" closed sets, i.e. intervals $[a, b]$ with $a, b\in\mathbb{R}$?
Well, it turns out that each such closed interval does get mapped to a closed set, under any continuous function. This is because bounded closed subsets of $\mathbb{R}$ are compact. A set $C$ is compact if, any time I have a bunch of open sets $\{U_i: i\in I\}$ which cover $C$ (that is, $C\subseteq\bigcup_{i\in I} U_i$), then there is some finite $J\subset I$ such that $\{U_j: j\in J\}$ covers $C$; that is, only finitely many of the $U$s are actually needed. For example, $\mathbb{R}$ itself is not compact: let $U_i=(-i, i)$ for $i\in\mathbb{R}_{>0}$. Clearly the $U_i$s cover $\mathbb{R}$, but no finite number of them cover $\mathbb{R}$. Similarly, $[1, \infty)$ is not compact.
It is easy to see that any compact subset of $\mathbb{R}$ is closed and bounded - that is, a finite union of closed intervals with real endpoints. It is significantly harder to show that the converse is also true - this is the Heine-Borel Theorem. (See http://www.math.utah.edu/~bobby/3210/heine-borel.pdf for a proof.)
Now, suppose $f: \mathbb{R}\rightarrow\mathbb{R}$ is continuous and $C\subset \mathbb{R}$ is a closed set which is compact (so, not $[1, \infty)$ or all of $\mathbb{R}$, etc.). Suppose $f(C)$ is not closed. Then we can pick some $r\not\in f(C)$ such that, for each $\epsilon>0$, there is some $s_\epsilon\in f(C)$ with $\vert s_\epsilon-r\vert<\epsilon$. (That is, $r$ is a limit point of $f(C)$ but not an element of $f(C)$.) Now, for $\epsilon>0$, let $U_\epsilon=\{x: \vert f(x)-r\vert>\epsilon\}$ be the set of points which get mapped to something more than $\epsilon$ distance away from $r$. Clearly every element of $C$ is in some $U_\epsilon$, since $r\not\in f(C)$, so the $U_\epsilon$s cover $C$; but also, since we can find points in $f(C)$ arbitrarily close to $r$, no finite collection of $U_\epsilon$s will cover $C$. So $C$ is not compact; contradiction.
This explains why the answers need to use "big" open sets. 
NOTE: Everything I've said above can be made much more general - this is basically the subject of topology.
A: Remember that not closed does not necessarily mean open.
Note that for all $x$
$$0\le\frac{x^2}{1+x^2}<1.$$
Now, suppose $0\le a<1$. Solving
$$\frac{x^2}{1+x^2}=a$$
for $x$ gives
$$x=\pm\sqrt{\frac a{1-a}}$$
The square root is defined because $0\le a<1$.
Therefore $f(\Bbb R)=[0,1)$, but $\Bbb R$ is closed while $[0,1)$ is not.
A: Hint:
The domain of $f(x)$ is $\mathbb{R}$ that is closed, but the range is not closed.
