Let $g:\mathbb{R}^n \to \mathbb{R}$ be a continuous function and for some $c>0$, we think its $c$-level set $g^{-1}(c)$.
Then does $g^{-1}(c)$ has a boundary? For example, is it possible that the set $\{x\in \mathbb{R} | 0\le x \le 1\}$ could be a level set of some continuous function?
I heard that if $g$ is differentiable, then its level set should be always manifold and so it thus not have boundary.
But how about level set for continuous function?
Any comments will be appreciated!
Yes the segment $[0,1]$ can be a level set of a continuous function. But for the example I'm going to construct it will be more convenient to show that $[1,2]$ is a level set of a continuous function
Consider the following continuous "trapezoid" function $f:\mathbb{R}\rightarrow\mathbb{R}$
(draw it)
I leave it as an exercise for you to show that this function is continuous (note that it is far from being differentiable). And it is easy to see that $[1,2]=f^{-1}(1)$.