Continuous function over the reals which maps closed sets to a not closed set My main question here may be notation but here is the actual problem:
"Give an example of a function $f : \mathbb{R} \rightarrow \mathbb{R}$ which is continuous and a set $E \subset \mathbb{R}$ closed but $f(E)$ is not closed"
Here are my issues:
1) I'm assuming the function has to be continuous over all of the reals so no sets that blow up are allowed.
2) This is the big one for me. I'm not sure if it was intended to be a proper subset or subset with possible equality.
Because $e^x$ would work  since the Reals are technically closed, also open but logically I don't think I'm cheating, and then the image would be the open set $(0,\infty)$.
Thoughts? And if you think it is proper does anyone have a good function that is continuous over the reals and maps a proper closed subset to one that isn't closed?
 A: Yes, $e^x$ would work as a counterexample. Just because the entire space of $\Bbb R$ happens to be open doesn't make it "cheating." 
If you'd prefer to use a proper subset, just take the set $(-\infty, 0]$, which is certainly closed.
A: Other counterexamples are:


*

*$\displaystyle \arctan(\mathbb{R})= \left(- \frac{\pi}{2}, \frac{\pi}{2} \right)$,

*$f([1,+ \infty))=(0,1]$ where $f : x \mapsto 1/x$,

*$\sin(\mathbb{Z})$ is a proper dense subset of $[0,1]$ so it cannot be closed.

A: You cannot find an example of a closed interval, or any bounded closed set. The reason is that closed and bounded sets are compact in $\Bbb R$, and the continuous image of a compact set is compact, which in particular implies being closed (again, in $\Bbb R$).
So the only counterexample would be with a closed set which is unbounded, so something of the form $[a,\infty)$ or $(-\infty,a]$, or $\Bbb R$ itself, is in order. The exponent function is just fine, then.
A: If $E$ is bounded, then it is compact, and $f(E)$ is compact and hence closed. Hence any example must have $E$ unbounded.
Your example is perfectly fine, if you want a slightly more complicated example, let $f(x) = \cos (2 \pi x)$, and take $E = \{ n + \frac{1}{n} \}_{n > 2}$. Then $E$ is closed, and $f(E) = \{ \cos(\frac{2 \pi}{n}) \}_{n > 2}$ which is neither closed nor open ($0 \notin f(E)$, but $0$ is a limit point).
