How to build a compact support for a function I was wondering if it is possible to build a distribution with compact support from a function. More precisely, consider a compact set $\mathbf{K}\subset\mathbb{R}^2\setminus\{0\}$, and a function $h:\mathbb{R}^2\to\mathbb{R}^2$ of class $\mathcal{C}^1$ such that, for every $y\in\mathbf{K}$, $h(y)\neq0$. Then, if there exists a compact set $\widetilde{\mathbf{K}}\supsetneq\mathbf{K}$ the distribution
\begin{equation*}
 \tilde{h}(y)=\left\{\begin{array}{rcl}
     h(y),&\text{if}&y\in\mathbf{K},\\
     h(y)\exp\left(-\dfrac{|y|_\mathbf{K}^2}{\mathtt{dist}^2\left(y,\mathbb{R}^2\setminus\widetilde{\mathbf{K}}\right)}\right),&\text{if}&y\in\mathtt{int}\left(\widetilde{\mathbf{K}}\right)\setminus\mathbf{K},\\
     0,&\text{if}&\text{otherwise}\\
    \end{array}\right.
\end{equation*}
is such that $\mathtt{supp}(\tilde{h})=\widetilde{\mathbf{K}}$ and, for every $y\in\mathbf{K}$, $\tilde{h}(y)=h(y)$. Is this correct?

Notation. $|y|_\mathbf{K}$ is the Hausdorff point-to-set distance: $|y|_\mathbf{K}:=\inf\{|x-y|:x\in\mathbf{K},y\notin\mathbf{K}\}$. Analogously, $\mathtt{dist}\left(y,\mathbb{R}^2\setminus\widetilde{\mathbf{K}}\right)$ is the is the Hausdorff point-to-set distance from $y$ to $\mathbb{R}^2\setminus\widetilde{\mathbf{K}}$.
Thanks in advance.
 A: I'd like to offer another approach to building $\tilde h$.
First step:
$h$ is $C^1$ and non-zero on $K$, hence there exists $\epsilon>0$ such that $h(x)\ne0$ whenever $dist(x,K)\le\epsilon$.
Second step: let's take a function $$\phi(x) = \begin{cases}c\exp\left(-\frac{1}{1-|x|^2}\right), &|x|<1,\\0,&\text{otherwise.}\end{cases}$$
where $c$ is chosen such that $\int_{\Bbb R^2}\phi(x)dx=1$. One can show that the function $\phi\in C_c^\infty(\mathbb R^2)$ and its support is $\{x:|x|\le 1\}$.
Now take for a positive $a$ the function $\phi_a(x):=a^2\phi(x/a)$. It's also in $ C_c^\infty(\mathbb R^2)$, its integral is $1$, and its support is $\{x:|x|\le a\}$.
Third step: consider for a positive $b$ the set $K_b:=  \{x:dist(x,K)\le b\}$. Easy to show that this is a superset of $K$, it's a compact, and $h$ is never zero on $K_{\epsilon/2}$.
We take $$\chi(x):=\begin{cases}1,&x\in K_{\epsilon/2},\\0,&\text{otherwise}.\end{cases}$$
Now consider the convolution 
$$\bar\chi=\chi\ast \phi_{\epsilon/2}.$$ This function is non-negative, its range is $[0,1]$, it's equal to $1$ on $K$, it's equal to $0$ on the set $\Bbb R^2\setminus K_\epsilon$. Moreover, it is a $C^\infty_c$ function and it's never zero on $   \{x:dist(x,K)< \epsilon\}$.
Last step: $\tilde h(x):= \bar\chi(x)h(x)$. It's still a $C^1$ function, it's equal to $h(x)$ on $K$, it's zero on $\Bbb R^2\setminus K_\epsilon$, it's never zero on the set $   \{x:dist(x,K)< \epsilon\}$.
