[Math] For what kind of sets, the distance function is differentiable

real-analysis

If $\Omega$ is closed subset $\mathbb{R}$, then the distance function
$$f\colon \mathbb{R}\rightarrow\mathbb{R}, \,\,\,\, x\mapsto d(\Omega,x),$$
is certainly a continuous function. An interesting property of this function is that, the points where $f$ vanishes is precisely the closed set $\Omega$.
However, this function is not necessarily differentiable: when $I=\{0\}$, then $f(x)=|x|$, which is not differentiable at $0$.

My question is, can we find other non-closed nice sets (like open sets, or some others) $\Omega$, for which $f$ above will become differentiable function on $\mathbb{R}$? Can we characterize such sets?

(The obvious examples would be dense subsets of $\mathbb{R}$, for which $f$ will be constant function $0$.)

Best Answer

I try an answer.

Suppose that $f(x)=d(x,\Omega)$ is differentiable, and $\overline{\Omega}$ is not equal to $\mathbb{R}$. Let $U=\mathbb{R}-\overline{\Omega}$, and $]u,v[$ a connected component of $U$; we have $u,v\in \overline{\Omega}$.

Then for $x\in ]\frac{u+v}{2},v]$, we have $f(x)=v-x$, hence $f^{\prime}(x)=-1$. In particular, we have $f^{\prime}(v)=-1$. Then for $|x-v|$ small, $x\not =v$, we have $\displaystyle \frac{f(x)-f(v)}{x-v}\leq -\frac{1}{2}$. Hence as $f(v)=0$, for $x>v$, $x-v$ small, we get $f(x)<0$, a contradiction. The case of $]-\infty,v[$ and $]u,+\infty[$ can be shown to lead to a contradiction on the same way. So $\overline{\Omega}$ must be equal to $\mathbb{R}$

Related Question