TITLE: The smooth Nullstellensatz
QUESTION [9 upvotes]: Let $n$ be a positive integer, let $f_1, \ldots, f_r : \mathbb{R}^n \to \mathbb{R}$ be smooth functions, let $Z_i = f_i^{-1} \{ 0 \} \subseteq \mathbb{R}^n$, and suppose $Z_1 \cap \cdots \cap Z_r = \emptyset$. 
Question. Must there exist smooth functions $g_1, \ldots, g_r : \mathbb{R}^n \to \mathbb{R}$ such that $f_1 g_1 + \cdots + f_r g_r = 1$?
I believe the answer is no in general. On the other hand:

It suffices to show that there exist smooth functions $g_1, \ldots, g_r : \mathbb{R}^n \to \mathbb{R}$ such that $f_1 g_1 + \cdots + f_r g_r$ vanishes nowhere, because we can rescale. Therefore a counterexample will have the property that, for any smooth functions $g_1, \ldots, g_r : \mathbb{R}^n \to \mathbb{R}$, $f_1 g_1 + \cdots + f_r g_r$ vanishes somewhere.
If $0$ is a regular value for each $f_i$, then the answer is yes: take a partition of unity $h_1 + \cdots + h_r = 1$ where each $h_i$ has support contained in $\mathbb{R}^n \setminus Z_i$ and then define $g_i = h_i / f_i$.
If we replace $\mathbb{R}$ with $\mathbb{C}$ and "smooth" with "polynomial", then this is a special case of Hilbert's Nullstellensatz.

REPLY [9 votes]: Let $f(x) = (f_1(x),...,f_r(x))^T$, then we see that $f(x) \neq 0$ for all $x$.
Let $g(x) = {1 \over \|f(x)\|^2} f(x)$, then we see that $\langle g(x), f(x) \rangle = 1$ for all $x$.
(And $g(x) = (g_1(x),...,g_r(x))^T$.)