TITLE: Smooth extension of a continuous function on the boundary of a domain
QUESTION [5 upvotes]: Let $\Omega$ be a open, bounded set in $\mathbb{R}^n$.
Suppose $g$ is a continuous function defined on the boundary $\partial \Omega$.
Then, is it possible to show that there exists a function $f$ defined (and continuous) on $\Omega \cup \partial \Omega$ such that $f$ is smooth in $\Omega$ and $f$ agrees on $g$ on $\partial \Omega$?
Also, how much smoothness (e.g. $C^k$) can we get?

REPLY [3 votes]: Yes, there is a $C^\infty$ extension.  The construction is due to Whitney, published in 1934. You can find it at the beginning of Singular integrals and differentiability properties of functions by Stein. It goes like this:  

Write $\Omega$ as the union of Whitney cubes $Q_j$.
Let $\varphi_j$ be a $C^\infty$ partition of unity subordinate to the cover $\frac32 Q_j$ (dilated the cubes to create an open cover but still keep them  away from $\partial\Omega$)
Pick a point $x_j\in\partial\Omega$ that realizes the distance $\operatorname{dist}(Q_j,\partial\Omega)$. 
The function $f(x) = \sum_j g(x_j) \varphi_j(x)$ has the desired properties.

Indeed, $f$ is $C^\infty$ smooth, being a locally finite sum of $C^\infty $ functions. As $x\to \zeta\in\partial\Omega$, the values of $g$ used in the construction of $f(x)$ are taken from progressively smaller neighborhoods of $\zeta$; hence they are close to $g(\zeta)$. This and the fact that $\{\varphi_j\}$ is a partition of unity imply $f(x)\to g(\zeta)$.