# Is every smooth surface the level surface of some function?

Let $\Omega$ be an open smooth domain in $\mathbb{R}^n$, then does there exist a smooth function $u$ such that $\{u<0\}=\Omega$ and $\{u=0\}=\partial \Omega$?

The answer is yes. When considering $\Omega \subset \mathbb{R}^n$, I assume you mean that $\Omega$ is a smooth manifold with boundary of some dimension $k \in \{1, \ldots, n\}$. I will roughly sketch the proof as it's given in Lee's Intro to Smooth Manifolds. In his text, this proposition is given on pages 118-119 and is a byproduct of the bigger subject of defining manifolds/submanifolds using immersions, embeddings, and submersions.
Proposition: Every smooth manifold with boundary $\Omega$ admits a boundary defining function: a smooth function $f:\Omega \to [0,\infty)$ such that $f^{-1}(0) = \partial \Omega$ and $df_p \neq 0$ for all $p \in \partial \Omega$.
Proof Sketch: Let $\{(U_\alpha, \varphi_\alpha)\}$ be a collection of smooth charts for $\Omega$ such that $\bigcup_\alpha U_\alpha = \Omega$. For each $\alpha$ define $f_\alpha:U_\alpha \to \mathbb{R}$ such that $f_\alpha \equiv 1$ if $U_\alpha \cap \partial \Omega = \emptyset$, otherwise if $U_\alpha$ intersects the boundary, let $f_\alpha(x^1, \ldots, x^n) = x^n$ be the $n$th coordinate (in local coordinates under $\varphi_\alpha$, $x^n = 0$ for boundary points). We see then that the $f_\alpha$ are positive on $Int \Omega$ and zero on $\partial \Omega$. We let $\{\psi_\alpha\}$ be a partition of unity subordinate to the cover $\{U_\alpha\}$, and define the function $f:\Omega \to [0, \infty)$ by
$$f(p) \;\; =\;\; \sum_\alpha \psi_\alpha(p) f_\alpha(p).$$