Suppose $f$ is continuous, then what is boundary of the set $\{x:f(x)>t\}$? It says that $\partial\{ x : f(x) > t\}\subset \{ x : f(x) = t\}$. I did not get why. I think they should be the same. Any hint would be appreciated. Thanks.
 A: $f$ being continuous means that the set $U(t)=\{x: f(x) > t\}$ is open as it equals $f^{-1}[(t , \infty)]$ and $L(t) = \{x: f(x) < t\}$ as well, as $L(t) = f^{-1}[(-\infty,t)]$ Also $f^{-1}[\{t\}]$ is closed, as $\{t\}$ is closed in $\mathbb{R}$. 
Note that if $X$ denotes the domain of $f$: 
$$X = L(t) \cup E(t) \cup U(t)$$
as  $f(x)<t$, $f(x)=t $ or $f(x)>t$, so these sets are mutually disjoint.
$U(t) \cap \partial U(t) = \emptyset$ as for any open set $O \cap \partial O = \emptyset$, Also clearly $L(t) \cap \partial U(t) = \emptyset$, as $U$ and $V$ open and disjoint implies $U \cap \partial V = \emptyset = \partial U \cap V$ both by the definition of the boundary.
So as $\partial U(t) \subseteq X$ but is disjoint from $L(t)$ and $U(t)$, we have $\partial U(t) \subseteq E(t)$, which is as required.
We can have strict inequality, even for $X = \mathbb{R}$: E.g. if a point $p$ with $f(p) = t$ is an isolated point of $X$. Or more generally if $\operatorname{int}(E(t)) \neq \emptyset$, E.g. take $f$ on the reals as $f(x) = -x, x \le 0$, $f(x) = 0 ,x \in [0,1]$ and $f(x) = x-1, x \ge 1$, which is continuous, and $\partial U(0) = \{1\}$, $\partial L(0) = \{0\}$ but $E(0) = [0,1]$.
But Michael Lee's example of $f(x) = (x-1)(x+1)^2$ also shows that the interior of $E(0)$ is empty but $\{1\} = \partial U(0) \subsetneq E(0)- \{-1,1\}$ 
A: What if $f$ only 'touches' from below $t$ at $x=c$? Is $c$ related to the set?
A: The complement of your set is composed of points where $f(x)=t$ and $f(x)<t$. Intuitively we should expect the boundary to be composed of those points where $f(x)=t$ by the intermediate value theorem, if $f$ were simply a function of the reals.
Hint: if $y$ is such that $f(y)<t$ then by continuity there is an open neighborhood of $U$ such that $y\in U$ and for any $z\in U$ we have $f(z)<t$.
A: Any closed set $C$ is the zero set of a nonnegative continuous function (for example, $f(x) = \inf_{y\in C} |x-y|$). Thus for example if $C$ has nonempty interior, then you do not get equality. 
