$d^2(p,\cdot)$ is not directional differentiable I was reading the paper Distance function and cut loci on a complete Riemannian manifold. I found two problems:


*

*How is he getting $$d(g_1(l-\varepsilon),g_2(l+\tau))=\sqrt{\varepsilon^2+\tau^2+2\varepsilon\tau \cos \omega }~(1+O(\tau^2))?$$ (Any reference will be hepful.

*How is he claiming that $d^2(p,\cdot)$ does not have derivatives along $g_i$ at $q$?



 A: 2) Suppose you have two functions $d(x)$ and $u(x)$ both defined near $q$,  with $d(x)\leq u(x)$, and such that there is a direction $v$ such that $d'_{-v}(q)=-1$ and $u'_{v}(q)<1$. Then $d$ is not differentiable at $q$. Indeed, if $d$ is differentiable then $Dd(q)$ exists and  $d'_{v}(q)=Dd(q)[v]=-Dd(q)[-v]=-d'_{-v}(q)=-(-1)=1$, but since $u\leq q$ we must have $u'_v(q)=\lim_{t\to 0+} \frac{u(q+tv)-u(q)}{t}\geq \lim_{t\to 0+}  \frac{d(q+tv)-d(q)}{t}=d'_v(q)=1$. Thus either $u'_v(q)$ does not exist or $u'_v(q)\geq 1$.
(Geometrically, if $d$ is differentiable at $q$, then the graph of $d$ would have a tangent plane at $(q, d(q))$ and directional derivatives of $d$ would be the slopes of tangent lines lying in this tangent plane. If $u\geq d$ the slopes for $u$ are higher than the slopes for $d$. If in some direction the slope for $d$ is $-1$, i.e. the opposite direction slope is $+1$, then the slope of $u$ in that direction would have to be at least $1$ as well.) 
1) Not a full answer: In Fermi coordinates adapted to the geodesic $g_1$ (blue in your picture) the metric is standard to second order near $g_1$ and  Christoffel symbols vanish on $g_1$ (see https://en.wikipedia.org/wiki/Fermi_coordinates and the reference therein). These coordinates define a map from a neighborhood of $g_1$ to a solid cylinder in $\mathbb{R}^n$ mapping $q_1$ to the axis of the cylinder and this map is "close to an isometry". In the Eucleidean space the theorem of cosines applied to the straight segments in the configuration as in the picture gives $d_{Euclidean}=\sqrt{{\varepsilon}^2+\tau^2+2\varepsilon\tau \cos \omega}$. Of course the point is to understand why the Fermi conditions imply that this formula still holds with error which is $O(\tau^2)$ in the original Riemannian manifold.
