# Points of differentiability of squared distance from a point in metric spaces

I posted this same question on MSE with no answer.

Let $$I:=(0, + \infty)$$ and let $$(X,d)$$ be a complete and separable metric space. In this setting we say that $$u : I \to X$$ is absolutely continuous if there exists $$g \in L^1(I)$$, $$g \ge0$$ s.t. $$\tag{1}\label{1} d(u_s,u_t) \le \int_s^t g(r)dr \quad \forall \, s,t \in I, \quad s \le t.$$ It is well known (see Duda - Absolutely Continuous Functions with Values in a Metric Space (DOI)) that such a $$u$$ is metrically differentiable.

Now for an absolutely continuous $$u : I \to X$$ and $$v \in X$$, consider the real-valued function $$f_{u,v} : I \to [0, + \infty)$$ defined by $$f_{u,v}(t):=d^2(u_t,v) \quad t \in I.$$ Then $$f$$ is also absolutely continuous, so it is differentiable for almost all $$t \in I$$. Let $$A_{u,v}$$ be the full-measure domain of differentiability for $$f_{u,v}$$.

Can we show that $$A_{u,v}$$ depends only on $$u$$?

For example, this is true if $$X$$ is a real separable Hilbert space, and even in Wasserstein spaces. Is this true in general?

• Does “$A_{u,v}$ depends only on $u$” mean “$A_{u,v}$ and $A_{u,v’}$ can only differ on a set of measure $0$”? I think that is what you mean and therefore the first answer doesn’t provide a counterexample.
– user44143
Jun 29, 2022 at 17:37

Consider the separable metric space $$X=[0,1]\times\{0,1\}$$ endowed with the $$\ell_1$$-metric $$d:X\times X\to\mathbb R$$ defined by $$d\big((x,i),(y,j)\big)=|x-y|+|i-j|.$$ It seems that this metric space yields a counterexample to your question.