# Smoothness of a curve vs. smoothness of the squared distance from the curve to points on Riemann manifolds

I know that the squared distance function from a point $p$ on a Riemann manifold $M$ is smooth in a n-hood of $p$. Therefore for a smooth curve $c:\mathbb{R}\to M$ the concatenation $d(p,\cdot)^2\circ c$ is smooth near a point $t_0$ for $p\in U$, where $U$ is a n-hood of $c(t_0)$.

What I am trying to prove (and where I failed up to now) ist the converse. That is if for $t_0\in \mathbb{R}$ there exists an $\varepsilon>0$ so that $d(p,\cdot)^2\circ c\big|_{(t_0-\varepsilon,t_0+\varepsilon)}$ is smooth for all $p$ in a n-hood of $c(t_0)$ does that mean that $c$ is smooth?

I tried to use the fact that the distance $d(c(t), p)^2 = \langle v_p(t), v_p(t) \rangle_x$ for $v_p(t)=\exp_{c(t)}^{-1}(p)$ and tried to show that $c$ satisfies a differential equation but none of these ideas seems to lead anywhere.

So is there any technique which can help me to prove this? Or does someone know a counterexample to this conjecture? (It holds in any Euclidean space and on $S^n$.)

I highly appreciate your help.

Take an orthonormal basis in the tangent space of $M$ at some point $p_0$ on your curve $c$. For each vector $u_i$ in that basis, let $p_i=\exp_{p_0}(-(\rho/2)e_i)$, where $\rho$ is the injectivity radius at $p_0$. Then the distance function $f_i(p)=d(p_i,p)$ from $p_i$ has gradient $e_i$ at $p_0$. So $f_1, f_2, \dots, f_n$ is a coordinate system near $p_0$. Your curve $c(t)$ is expressed by smooth functions in those coordinates.