Derivative of norm of vector field Let $M$ be a smooth riemannian manifold with metric $\langle \cdot, \cdot \rangle$ and Levi-Civita connection $\nabla$. For $X$ a vector field on $M$, define $f : M \to \mathbb{R}$ by $$f(p) = \langle X(p), X(p) \rangle.$$
I want to calculate the derivative of $f$. Is the following correct?
$$ df(p) \cdot v = v(f) = v \langle X, X\rangle = 2 \langle \nabla_v X, X(p) \rangle, \qquad p \in M, \, v \in T_p M. $$
 A: Yes it is. You can easily check this in local coordinates.
Namely, fix a "Gauss" coordinate system centred at $p$ (the one constructed with the exponential map), so that 
$$g_{ij}(p)= \delta_{ij} \ \ \ \ \ \ \ \ \frac{\partial g_{ij}}{\partial x^\ell}(p)=0 \ \ \ \ \ \ \ \text{and} \ \ \ \  \ \ \Gamma_{ij}^k(p)=0 \ .$$
Write $ X = X^i \frac{\partial}{\partial x^i}$ (in Einstein notation) and observe that
$$ df = \frac{\partial f}{\partial x^\ell} dx^\ell =  \frac{\partial }{\partial x^\ell} \big< X, X \big>  dx^\ell = \frac{\partial }{\partial x^\ell} \Big< X^i\frac{\partial}{\partial x^i},  X^j\frac{\partial}{\partial x^j}\Big>  dx^\ell = \frac{\partial }{\partial x^\ell} \Big( X^i  X^j g_{ij} \Big) dx^\ell \ .$$
Thus, because of the Liebeniz rule
$$ df =  \frac{\partial X^i }{\partial x^\ell}  X^j g_{ij}  dx^\ell
+X^i\frac{\partial X^j }{\partial x^\ell}  g_{ij}  dx^\ell 
+ X^i   X^j \frac{\partial g_{ij}}{\partial x^\ell}  dx^\ell \\
= 2\frac{\partial X^i }{\partial x^\ell}  X^j g_{ij}  dx^\ell 
+ X^i   X^j \frac{\partial g_{ij}}{\partial x^\ell}  dx^\ell\ . $$ 
Evaluating at $p$ the expression simplifies to
 $$ df(p) = 2\frac{\partial X^i }{\partial x^\ell}(p)  X^j(p) \delta _{ij}  dx^\ell  =  2\frac{\partial X^i }{\partial x^\ell}(p)  X^i(p) dx^\ell \ . $$ 
Now take 
$$v=v^i \frac{\partial}{\partial x^i}\Big|_p \in T_pM \ ,$$
and observe that (since $\Gamma_{ij}^k=0$ at $p$) 
$$ df(p) \cdot v = 2\frac{\partial X^i }{\partial x^\ell}(p)  X^i(p) v^\ell= 2 \cdot (\nabla_v X)^i \delta_{ij} X^j(p)= 2 \cdot \big<\nabla_v X , X\big>_p \ . $$
You can do something similar to prove the other equality.
