a question on continuous extension We define a function over a bounded domain $\Omega\subset\mathbb{R}^N$ with a $C^2$ boundary as $\frac{\phi}{\rho}$ where $\phi\in C^2_0(\bar{\Omega})$, $\rho(x)=dist(x,\partial\Omega).$
Then what will be the continuous extension of this function say $\bar{\phi}$?.
My argument: Let $x_0\in\partial\Omega$. We look for $\underset{x\rightarrow x_0}{\lim}\frac{\phi}{\rho}=-\frac{\partial\phi}{\partial\hat{n}}$, $\hat{n}$ being the unit normal at $x_0$.
Here comes my question of what if $x\rightarrow x_0$ along any vector $\vec{v}$ which is not the normal $\hat{n}$?. We end up getting $\frac{\nabla\phi\cdot\vec{v}}{|\vec{v}|}$. Now certainly $\frac{\nabla\phi\cdot\vec{v}}{|\vec{v}|}$ may not be equal to $-\frac{\partial\phi}{\partial\hat{n}}$. Then how do we end up extending $\frac{\phi}{\rho}$ continuously to the boundary $\partial\Omega$?.
 A: Since $\phi$ vanishes on $\partial\Omega$, you have that $\nabla\phi(x_0)$ is normal to $\partial\Omega$, i.e.
$$
\nabla\phi(x_0) = c\, \hat{n},
\qquad \text{where}\ c:=\frac{\partial\phi}{\partial\hat{n}}(x_0)\,.
$$
Since $\nabla\rho(x_0) = -\hat{n}$, given a direction $v$ such that $\hat{n}\cdot v < 0$ you get
$$
\lim_{t\to 0+} \frac{\phi(x_0+t v)}{\rho(x_0+t v)} = 
\frac{c\, \hat{n}\cdot v}{-\hat{n}\cdot v} = -c.
$$
A: Let $\delta>0$ be small (we shall soon say more about "small") and define a map $$\psi:\partial\Omega\times(0,\delta)\to\Omega,\quad(p,t)\mapsto p+t\hat{n}(p).$$ We take $\delta$ so small such that $\psi$ is injective (by the inverse mapping theorem such a $\delta$ indeed exists). One can then easily show that$$\rho(\psi(p,t))=t,\quad(p,t)\in\partial\Omega\times(0,\delta).$$ Let $U$ denote the image of $\psi$, and for the sake of this answer identify $U$ with $\partial\Omega\times(0,\delta)$. Extend the vector field $\hat{n}$ to the whole of $U$ by letting it be the unit vector in the direction of the $(0,\delta)$ coordinate. Now, for the point $q=(p,t)$ define the path$$\gamma_q:[0,1]\to\overline{\Omega},\;s\mapsto p+st\hat{n}$$ which is the shortest line from $\partial\Omega$ to $q$. As $\phi$ vanishes on $\partial\Omega$, we have $$\phi(q)=\phi(\gamma_q(1))=\int_0^1\frac{d}{ds}\phi(\gamma_q(s))ds=\int_0^1t\frac{\partial\phi}{\partial\hat{n}}(\gamma_q(s))ds=t\int_0^1\frac{\partial\phi}{\partial\hat{n}}(\gamma_q(s))ds.$$ Hence,$$\frac{\phi(q)}{\mathrm{dist}(q,\partial\Omega)}=\frac{\phi(q)}{t}=\int_0^1\frac{\partial\phi}{\partial\hat{n}}(\gamma_q(s))ds=\int_0^1\frac{\partial\phi}{\partial\hat{n}}(p+st\hat{n})ds,$$which certainly extends continuously to $\partial\Omega=\{t=0\}$.
Edit: It may be helpful to add a word regarding the value of the extension on the boundary. A point on the boundary, using the above notation, is just $(p,0)$. Substituting $t=0$ into the above integral yields$$\int_0^1\frac{\partial\phi}{\partial\hat{n}}(p)ds=\frac{\partial\phi}{\partial\hat{n}}(p).$$
