Carothers Chapter 4, Exercise 5 I'm having some trouble interpreting the following question. 

Let $f: \mathbb{R}\to\mathbb{R}$ be continuous. Show that $\{x\,:\, f(x) > 0\}$ is an open subset of $\mathbb{R}$ and that $\{x\,:\,f(x)=0\}$ is a closed subset of $\mathbb{R}$.

My first response would be something like:

The set $Y = \{f(x): f(x) > 0\}$ is open because for each $y\in Y$, we can choose $0< \epsilon < y$ so that $B_{\epsilon}(y) \subset Y$. Because $f$ is continuous, $f^{-1}(Y) = \{x: f(x) > 0\}$ is also open. Similarly, $\{0\}$ is closed and because $f$ is continuous, $f^{-1}(\{0\})$ is also closed.

All that said, I'm not sure what $Y$ really means. What if $f(x)$ is some positive constant or if $Y$ is bounded and $\inf\, Y  > 0$? It seems like I should be considering any positive functions (as above). In that case, is $Y$ an open subset of a function space? 
 A: The proof to your first assertion is not correct. First of all, notice that:
$$X=\{x\in \mathbb R: f(x)>0\}=f^{-1}((0, +\infty))$$ that is, the elements of $X$ are precisely those elements $x$ in the domain of $f$ such that $f(x)\in (0, +\infty)$. 
Since $f$ is continuous you are left to prove $(0, +\infty)$ is an open subset of $\mathbb R$ (recall a function is continuous if and only if the preimage of every open subset is an open subset).
Your second assertion about $\{x: f(x)=0\}$ is correct but you could also see:
$$
\begin{align*}
\{x\in \mathbb R: f(x)=0\}&=\mathbb R\setminus\{x\in \mathbb R: f(x)\neq 0\}\\
&=\mathbb R\setminus(\{x\in\mathbb R: f(x)>0\}\cup \{x\in\mathbb R: f(x)<0\})\\
&=\mathbb R\setminus (f^{-1}(-\infty, 0)\cup f^{-1}(0, +\infty))
\end{align*}
$$
 and since $f^{-1}(-\infty, 0)\cup f^{-1}(0, +\infty)$ is open, its complement is closed.
A: I think the discussion you first responded is wrong since $Y=\{f(x):f(x)>0\}$ you defined is not necessarily open. Generally speaking, if my understanding is not wrong, the $Y$ you defined is $Y=f(\mathbb{R})\cap (0,+\infty)$, and $f(\mathbb{R})$, the image of $f$, is not necessarily open. I hope you can see where is wrong, by looking some specific examples.
Example 1. Let $f(x)=5$ for all $x\in\mathbb{R}$. It is a positive constant function. In this case your $Y=\{f(x):f(x)>0\}$ equals to a point $\{5\}$ and is not open.
Example 2. Let $f(x)=\sin(x)$. Then $f(\mathbb{R})=[-1,1]$, a closed interval between $-1$ and $1$, and $Y=(0,1]$, a left half open interval between $0$ and $1$. So $Y$ is not open.
