If $C\subset\mathbb{R}^n$ is closed, then $C=f^{-1}(0)$ for some smooth $f:\mathbb{R}^n\to\mathbb{R}$.

66 Views Asked by At

Let $C\subset \mathbb{R}^n$ closed. Prove that there is a smooth function $f:\mathbb{R}^n\to\mathbb{R}$ such that $C=f^{-1}(0)$.

I've found this solution in the internet: take a cover of balls $\{B_i\}_i$ of $\mathbb{R}^n\setminus C$ and a partition of unity $\{f_i\}_i$ subordinate to $\{B_i\}_i$ and define $f:=\sum_{i=1}^\infty \frac{f_i}{2^iM_i}$, where: $$M_i:=\sup\left\{\frac{\partial^kf_i}{\partial x_{j_1}\cdots \partial x_{j_k}}(p)\mid 1\leq j_1<...<j_k\leq n,\, k\leq i,\,p\in B_i\right\}$$

My question is: why do we need to define these $M_i$'s?

Why can't we just define $f=\sum_{i=1}^\infty \frac{f_i}{2^i}$ for example?

In that case, since $\{B_i\}_i$ can be considered locally finite, then for $p\in\mathbb{R}^n$, there is some open $U\subset\mathbb{R}^n\setminus C$ containing $p$ such that $f_i|_U\equiv 0$ for all but finitely many $i$ (say $i_1,...,i_k$), so $f|_U=\frac{f_{i_1}}{2^{i_1}}+...+\frac{f_{i_k}}{2^{i_k}}$, which is obviously smooth.

What am I missing?