# Find a smooth function $f \in C^\infty$ such that $A=f^{-1}(0)$ and $B=f^{-1}(1)$

The problem is:

Let $A$ and $B$ disjoint closed subsets of a smooth manifold $M$. Show that there exist a function $f \in C^\infty(M)$ such that $A=f^{-1}(0)$ and $B=f^{-1}(1)$.

I thought this problem could be solved by using the Smooth Urysohn's Lemma, but can't see how to guarantee that $0 < f(x) < 1$ for all $x\in M\backslash (A\cup B)$. Tips?

• By the way, in your question you did not say that $0\le f\le 1$, although I certainly agree that this can be arranged. May 15 '17 at 22:49
• @TedShifrin The Urysohn's Lemma say that the Codomain is $[0,1]$. I was referring to that. But if you know how to obtain a function (with any Codomain) satisfying what I want, please let me know. May 16 '17 at 23:31
• The Urysohn Lemma is not good enough here. It only gives you continuous functions. What are you referring to as the Smooth Urysohn Lemma? May 16 '17 at 23:34

I originally misread the question and thought you wanted $A\subset f^{-1}(0)$ and $B\subset f^{-1}(1)$. This can be arranged, as I suggested, with a simple partition of unity argument:

Let $\{\phi_i\}$ be a partition of unity subordinate to the open cover $\mathscr U = \{X-A,X-B\}$ of $X$. Let $$\phi_A = \sum_{i: \,\text{supp }\phi_i\subset X-B} \phi_i \qquad\text{and}\qquad \phi_B = \sum_{i:\, \text{supp }\phi_i\subset X-A} \phi_i.$$ Note that $\phi_B(x)=0$ when $x\in A$, $\phi_B(x)=1$ when $x\in B$ (since $\phi_A+\phi_B=1$), and, of course, $0\le\phi_B\le 1$. Thus, the function $f=\phi_B$ will do.

To get the full result you seek we need to be a bit trickier. As @zhw suggested, it will suffice to find a smooth function $g$ with $g^{-1}(0)=A$ and $g\ge 0$. For then we similarly find a smooth function $h$ with $h^{-1}(0)=B$ and $h\ge 0$ and take $f=g/(g+h)$.

Here's a sketch of how you can obtain $g$. Let $\{U_i\}$ be a countable open cover of $M-A$ by sets diffeomorphic to an open ball with the property that sub-balls $U'_i\subset \overline{U'_i}\subset U_i$ also cover $M-A$. Let $g_i\colon M\to [0,1]$ be a smooth function with $g_i>0$ on $U'_i$ and $g_i=0$ on $M-U'_i$. Then the partial derivatives of $g_1,g_2,\dots,g_i$ of all orders $\le i$ are bounded (in magnitude) above on $M$, say, by $k_i>0$. Define $$g = \sum_i \frac{g_i}{k_i2^i},$$ and check that $g\in C^\infty$ and $g^{-1}(0)=A$.

Partial answer: Suppose you can find $f,g\in C^\infty(M)$ such that $f=0$ on $A,$ $f>0$ elsewhere, and $g=0$ on $B,$ $g>0$ elsewhere. Then $f/(f+g) = 0$ on $A,$ $f/(f+g) = 1$ on $B,$ and $0<f/(f+g)<1$ elsewhere.

• How could I find such smooth functions? May 14 '17 at 1:41
• Do you know about partitions of unity subordinate to an open cover of a manifold? If not, look them up. May 15 '17 at 22:41
• @TedShifrin Yes, the Urysohn Lemma is used to prove the existence of them. Could this solve the problem? May 16 '17 at 23:32
• I mean smooth ($C^\infty$) partitions of unity here. May 16 '17 at 23:34
• @TedShifrin Yes, I know. Could this solve the problem? May 17 '17 at 5:12