Let $M$ be a manifold.
Show that for any closed set $F\subset M$, there exists $\varphi : M\to \mathbb R$ s.t. $\varphi$ is smooth and $F=\varphi^{-1}(\{ 0 \})$.
I think the function like this seems to work. ($\square$ is unknown yet.)
$\varphi(x)=\chi_{M\setminus F}\cdot \exp{\square}$, i.e., $\varphi(x)=\begin{cases} 0 &\mathrm{if} \ x\in F \\ \exp{\square} &\mathrm{if}\ x\in M\setminus F \end{cases}$
Then, I can see $\varphi^{-1}(0)=F$, so I want to determine $\square$ s.t. $\varphi$ is smooth.
Am I on right track ? and if so, what kind of function is in $\square$ ?