Knowing that $\omega\Subset\Omega\subset\mathbb{R}^2$ (compactly included) are two open and bounded sets with $C^2$ boundary, is it true that for any function $\phi\_0:\overline{\omega}\to\mathbb{R},\ \phi\_0\in C^1(\overline{\omega})$ ($\overline{\omega}$ is the closure of $\omega$) we can find an extension $\phi:\Omega\to\mathbb{R}$ with $\phi\in C^1\_{c}(\Omega)$ (compactly supported in $\Omega$)?


**Motivation**


If this type of result is true than we can obtain simple formulas for perimeter of implicitly defined curves in $\mathbb{R}^2$, putting $\phi\_0$ the unit outer normal vector to a regular curve (which is defined in a neighborhood of the boundary of $\omega$). See here: [Perimeter continuity of $BV$ sets on any sequence from $W^{1,1}$](https://mathoverflow.net/questions/398001/perimeter-continuity-of-bv-sets-on-any-sequence-from-w1-1)


**What did I do?**


I proved by standard methods (using cut-off functions and convolution) that we can obtain a mollifying sequence $\phi\_n,\ n\in\mathbb{N}^\*$ compactly supported in $\Omega$ that tends to $\phi\_0$ in $L^1(\Omega)$, but I cannot prove that we can indeed have an extension.



$C^1$ extension with compact support
$\newcommand\de\delta\newcommand\Om\Omega\newcommand\om\omega\newcommand\R{\mathbb R}$The answer is yes. Indeed, by [Whitney's theorem](http://www.ams.org/tran/1934-036-01/S0002-9947-1934-1501735-3/S0002-9947-1934-1501735-3.pdf), there is a function $f\in C^1(\mathbb R^2)$ whose restriction to $\overline\omega$ is $\phi\_0$. Now take any open set $\Omega\_0$ such that $\omega\Subset\Omega\_0\Subset\Omega$ and then any
function $g\in C^1(\mathbb R^2)$ such that $g=1$ on $\overline\omega$ and $g=0$ on $\mathbb R^2\setminus\Omega\_0$. It remains to let $\phi$ be the restriction of $gf$ to $\Om$. (The conditions that $\om$ and $\Om$ have $C^2$ boundaries and that $\Om$ be bounded are not needed. The condition that $\om$ be bounded follows from $\om\Subset\Om$.)




---


**Detail:** The set $\Om\_0$ and the function $g$ can be constructed as follows. Since $\om\Subset\Om$, there is some real $\de>0$ such that the closure $\overline{\om\_{2\de}}$ of the $(2\de)$-neighborhood $\om\_{2\de}$ of $\om$ is contained in $\Om$. Let then $\Om\_0:=\om\_{2\de}$ and $g:=1\_{\om\_\de}\*\psi\_\de$, where $\psi\_\de$ is any nonnegative function in $C^1(\R^2)$ supported on the ball of radius $\de$ in $\R^2$ centered at $0$ and such that $\int\_{\R^2}\psi\_\de=1$.


