[guided]Why do we need a global defining function? Each local defining function $\rho_{p_i}$ characterises $\partial\Omega$ near a single boundary point, but the candidate exhaustion $-\log(-\rho)$ must be defined on all of $\Omega$ near $\partial\Omega$. A global $\rho$ ensures that $-\log(-\rho)$ is a single well-defined function, not a patchwork of local constructions. The strategy is to glue the local defining functions using a [partition of unity](/page/Partition%20of%20Unity).
Since $\partial\Omega$ is compact and $C^2$, for each boundary point $p \in \partial\Omega$ there exists an open neighbourhood $V_p \subset \mathbb{C}^n$ and a $C^2$ function $\rho_p: V_p \to \mathbb{R}$ satisfying:
- $\Omega \cap V_p = \{z \in V_p : \rho_p(z) < 0\}$,
- $\rho_p = 0$ on $\partial\Omega \cap V_p$,
- $\nabla\rho_p \neq 0$ on $\partial\Omega \cap V_p$.
These three properties are the defining conditions for a local defining function of a $C^2$ hypersurface: the zero set is the boundary, the function is negative inside, and the gradient is nonvanishing (so the boundary is a regular level set by the [implicit function theorem](/page/Implicit%20Function%20Theorem)).
The collection $\{V_p\}_{p \in \partial\Omega}$ covers the compact set $\partial\Omega$, so we can extract a finite subcover $\{V_{p_1}, \dots, V_{p_N}\}$. Why does compactness matter here? Because a [partition of unity](/page/Partition%20of%20Unity) subordinate to an infinite cover might not be $C^\infty$, and we need finite summation to preserve the $C^2$ regularity. Let $\{\chi_i\}_{i=1}^N$ be a $C^\infty$ [partition of unity](/page/Partition%20of%20Unity) subordinate to this finite cover, meaning $\chi_i \in C_c^\infty(V_{p_i})$, $\chi_i \geq 0$, and $\sum_{i=1}^N \chi_i = 1$ on a neighbourhood of $\partial\Omega$. Define
\begin{align*}
\rho: \bigcup_{i=1}^N V_{p_i} &\to \mathbb{R} \\
z &\mapsto \sum_{i=1}^N \chi_i(z)\, \rho_{p_i}(z).
\end{align*}
We must verify the three defining-function properties for $\rho$:
**Zero set.** On $\partial\Omega$, each $\rho_{p_i}$ vanishes, so $\rho(z) = \sum_{i=1}^N \chi_i(z) \cdot 0 = 0$. Thus $\rho = 0$ on $\partial\Omega$.
**Sign condition.** In $\Omega$ near $\partial\Omega$, each $\rho_{p_i}(z) < 0$ (by the local defining-function property) and each $\chi_i(z) \geq 0$, so every term $\chi_i(z)\,\rho_{p_i}(z) \leq 0$. Since $\sum_i \chi_i = 1$ and at least one $\chi_i(z) > 0$ with $\rho_{p_i}(z) < 0$, the sum $\rho(z) < 0$.
**Non-vanishing gradient.** This is the most delicate verification. At a point $z_0 \in \partial\Omega$, we apply the product rule to each term $\chi_i \rho_{p_i}$:
\begin{align*}
\nabla\rho(z_0) = \sum_{i=1}^N \chi_i(z_0)\,\nabla\rho_{p_i}(z_0) + \sum_{i=1}^N \nabla\chi_i(z_0)\,\underbrace{\rho_{p_i}(z_0)}_{=0} = \sum_{i=1}^N \chi_i(z_0)\,\nabla\rho_{p_i}(z_0).
\end{align*}
The second sum vanishes because every $\rho_{p_i}(z_0) = 0$ on $\partial\Omega$. Why is the remaining sum nonzero? The partition-of-unity construction works because on the overlaps $V_{p_i} \cap V_{p_j} \cap \partial\Omega$, the local defining functions $\rho_{p_i}$ and $\rho_{p_j}$ both vanish and have gradients pointing in the same outward direction (since they define the same hypersurface with the same orientation). More precisely, each $\nabla\rho_{p_i}(z_0)$ is a positive scalar multiple of the unit outward normal to $\partial\Omega$ at $z_0$. Since $\sum_i \chi_i = 1$ and $\chi_i \geq 0$, the sum $\sum_{i=1}^N \chi_i(z_0)\,\nabla\rho_{p_i}(z_0)$ is a convex combination of vectors all pointing in the same direction, hence nonzero. Thus $\nabla\rho \neq 0$ on $\partial\Omega$.
This confirms that $\rho$ is a global $C^2$ defining function for $\partial\Omega$ in a neighbourhood $U$ of $\partial\Omega$.
By extending $\rho$ smoothly to all of $\mathbb{C}^n$ (setting $\rho > 0$ outside $\overline{\Omega}$ and $\rho < 0$ in $\Omega$), we may assume $\rho$ is defined globally with $\Omega = \{\rho < 0\}$ and $\nabla\rho \neq 0$ on $\partial\Omega$. Such an extension exists by standard smooth extension results: one can multiply by a smooth cutoff function that equals $1$ near $\partial\Omega$ and then add a term like $\operatorname{dist}(z, \partial\Omega)$ with appropriate sign outside $\overline{\Omega}$.[/guided]