It has been proven that: $d(p)=|p-p^0|$, $p \in S$ is differentiable when $p^0 \notin S$ and $S$ is a regular surface in $R^3$
I wonder if it holds when $S$ is not a regular surface
Suppose $p^0=(x^0,y^0,z^0)$, $p=(x,y,z)$, then $d(p)={((x-x^0)^2 +(y-y^0)^2 +(z-z^0)^2)}^{\frac12}$
For me $d(p)$ is differentiable in $R^3$ because $p^0 \notin S$, and after derivation the denominator will not be $0$
Are there any problem?