# Derivative of distance function on a Riemannian manifold.

While reading Andrews and Hopper's book on Ricci flow, I found the following computation which I am not able to verify.

$$M$$ is a compact Riemannian manifold and $$p \in M$$ and $$r>0$$. We are interested in the function $$\psi(x) = \phi\left(\frac{d_{g}(x,p)}{r}\right)$$. Here $$\phi$$ is a smooth bump function $$\phi: [0,\infty) \to \mathbb{R}$$ with the following properties.

1. $$\phi = 1$$ on $$[0,1/2]$$.
2. $$\phi = 0$$ on $$[1,\infty)$$.
3. $$|\phi'| \leq 3$$ on $$[1/2,1]$$.

Now we want to compute the derivative of $$\psi$$. Claim is that $$|\nabla \psi| \leq \frac{1}{r} \sup |\phi'|$$.

I assumed $$r$$ is small enough so that $$B(p,r)$$ lies in a normal neighborhood around $$p$$, then $$d_{g}(p,x)= \sqrt{x_{1}^{2} + \dots + x_{n}^{2}}$$ in normal coordinates around $$p$$. Then I see that $$\frac{\partial \psi}{\partial x_{i}} = \frac{1}{r}\phi'\left( \frac{d_{g}(x,p)}{r}\right) \frac{x_{i}}{\sqrt{x_{1}^{2} + \dots + x_{n}^{2}}}.$$

Thus $$|\nabla \psi|^{2} = g^{ij}(x)\frac{\partial \psi}{\partial x_{i}} \frac{\partial \psi}{\partial x_{j}} = \frac{1}{r^{2}}\phi'\left(\frac{d_{g}(x,p)}{r}\right)^{2}\frac{g^{ij}(x)x_{i}x_{j}}{x_{1}^{2} + \dots + x_{n}^{2}}.$$

I don't know how to go forward. I tried working in normal coordinates around $$x$$, that didn't seem to work either.

Also, I am not sure how to deal with the derivative of the distance function if $$x$$ is not in a normal neighborhood of $$p$$.

• If $x$ is not in a normal neighborhood of $p$, $d$ might not be differentiable. – Arctic Char Aug 11 at 16:53

Another more intuitive (and coordinate free) way to see this: Since $$\psi (x) = \phi \left( \frac{d(x, p)}{r}\right)$$, $$\nabla \psi = \phi' \left(\frac{d(x, p)}{r}\right) \cdot \frac{\nabla d}{r}$$

So it suffices to show that $$|\nabla d|\le 1$$. This follows from triangle inequality: Let $$v\in T_xM$$. Then $$\gamma (t) = \exp_x (tv)$$ is a curve on $$M$$ with $$\gamma(0) = x$$, $$\gamma'(0) = v$$. Then

\begin{align*} \langle \nabla d, v\rangle &= \frac{d}{dt} d(p, \gamma(t))\bigg|_{t=0} \\ &= \lim_{t\to 0} \frac{d(p, \gamma(t)) - d(p, x)}{t} \end{align*}

Since by triangle inequality, $$\left|\frac{d(p, \gamma(t)) - d(p, x)}{t}\right| \le \frac{d(x, \gamma(t))}{|t|} = \frac{|t|\| v\|}{|t|} = \|v\|$$

we have $$|\langle \nabla d, v\rangle| \le \|v\|\Rightarrow |\nabla d| \le 1$$

(e.g. by picking $$v = \nabla d$$).

We use nothing but that the distance function $$d(\cdot, p)$$ is Lipschitz with Lipschitz constant $$1$$. This already implies that the gradient is $$\le 1$$.

You've almost completed the computation. The last step is noting that in normal coordinates the radial vector field $$\frac{\partial}{\partial r}=\frac{x_i}{\sqrt{x_1^2+\dots+x_n^2}}\frac{\partial}{\partial x_i}$$ is a has unit magnitude (because it is the velocity of a unit speed geodesic). Thus, the second term in your expression $$\frac{g^{ij}x_ix_j}{x_1^2+\dots+x_n^2}$$ is equal to $$1$$.