TITLE: Can we approximate any open set by sub-domains with smooth boundary?
QUESTION [10 upvotes]: In some books, mainly about PDEs, I read that any open set can be approximated by sub-domain with smooth boundary  (not just piecewise smooth). In 2 dimensional case, this seemly to be quite trivial: for any subdomain, use small open balls to cover its boundary and then mollify the connection parts. But in the higher dimensional case, I think this is not that obvious.
So the first question is:  how can we approximate any open set by sub-domain with smooth boundary?
And the second question is: In what meaning the approximation is? Pointwise, i.e., we can find subdomain $D_n$ with smooth boundary such that $D_n\uparrow A$? uniformly pointwise? Or in the Lebesgue measure sense? etc.
Here "$D_n\uparrow A$" uniformly pointwise" means  means that $\partial D_n\subset A\cap A_n^c$, where  $A_n:=\{ x \in A:d(x,\partial A)\geq \frac1n \}$,.

REPLY [8 votes]: By a well-known theorem of Whitney, any closed subset of $R^n$ coincides with the zero set of a $C^\infty$ function:
Whitney, Hassler: Analytic extensions of differentiable functions defined in closed sets, Trans. AMS 36 (1934), 63--89.
Let $f$ be such a function for the boundary of the domain. By Sard's theorem $f$ has a regular value $x$ arbitrarily close to $0$. Then a component of $f^{-1}(x)$ yields the desired approximation. To get a subdomain, make sure that $x$ coincides with a value of $f$ inside the domain.
There is an even easier way of doing this when the domain is bounded: cover the domain by balls of radius $\epsilon$, or take the union of a finite collection of balls of radius $\epsilon$ contained in the domain and covering a compact subset. For each ball let $f\colon R^n\to R$ be the function whose zero  set coincides with the boundary of the ball (i.e., the distance function from the center of the ball minus the radius). Now multiply all these functions to obtain a function $F$, and take a level set of $F$ close to $0$.
The second method yields a subdomain which is not only smooth but is algebraic. In both cases here, the approximation is with regard to the Hausdorff distance.