# Commuting Laplacian and Divergence

I'm trying to understand why $$\Delta(\nabla f) - \nabla(\Delta f) = (n - 1) \text{Ric}(\nabla f),$$ where I'm working on a Riemannian manifold, $\Delta$ is the Laplace-Beltrami operator, $\nabla$ is the gradient, and $\text{Ric}(\cdot)$ is the linear map on vector fields induced by $$\langle \text{Ric}(X),Y \rangle = \text{Ric}(X,Y),$$ where $\langle \cdot, \cdot \rangle$ is the metric and $\text{Ric}(\cdot,\cdot)$ is the Ricci tensor.

Let $\{E_{1},\dots,E_{n}\}$ be a local orthonormal frame on $M$. Appealing to the definitions, we obtain \begin{align*} \langle \Delta(\nabla f), E_{k} \rangle - \langle \nabla(\Delta f), E_{k} \rangle &= \sum_{i = 1}^{n} \langle \nabla_{E_{i}} \nabla_{E_{i}} \nabla f, E_{k} \rangle - \langle \nabla_{\nabla_{E_{i}} E_{i}} \nabla f, E_{k} \rangle - E_{k}(\langle \nabla_{E_{i}} \nabla f, E_{i} \rangle) \\ &= \sum_{i = 1}^{n} E_{i}(\langle \nabla_{E_{i}} \nabla f, E_{k} \rangle) - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{i}} E_{k} \rangle - \langle \nabla_{E_{k}} \nabla f, \nabla_{E_{i}} E_{i} \rangle \\ &\quad - \langle \nabla_{E_{k}} \nabla_{E_{i}} \nabla f, E_{i} \rangle - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{k}} E_{i} \rangle \end{align*} Above we used the fact that $\nabla^{2} f$ is symmetric to obtain $\langle \nabla_{\nabla_{E_{i}} E_{i}} \nabla f, E_{k} \rangle = \langle \nabla_{E_{k}} \nabla f, \nabla_{E_{i}} E_{i} \rangle$. By symmetry, we also find $E_{i}(\nabla_{E_{i}} \nabla f, E_{k} \rangle) = E_{i}(\nabla_{E_{k}} \nabla f, E_{i} \rangle)$. Thus, \begin{align*} \langle \Delta(\nabla f), E_{k} \rangle - \langle \nabla(\Delta f), E_{k} \rangle &= \sum_{i = 1}^{n} \langle \nabla_{E_{i}} \nabla_{E_{k}} \nabla f, E_{i} \rangle + \langle \nabla_{E_{k}} \nabla f, \nabla_{E_{i}} E_{i} \rangle - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{i}} E_{k} \rangle \\ &\quad - \langle \nabla_{E_{k}} \nabla f, \nabla_{E_{i}} E_{i} \rangle - \langle \nabla_{E_{k}} \nabla_{E_{i}} \nabla f, E_{i} \rangle - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{k}} E_{i} \rangle \\ &= \sum_{i = 1}^{n} \langle \nabla_{E_{i}} \nabla_{E_{k}} \nabla f, E_{i} \rangle - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{i}} E_{k} \rangle - \langle \nabla_{E_{k}} \nabla_{E_{i}} \nabla f, E_{i} \rangle \\ &\quad - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{k}} E_{i} \rangle \end{align*} Now I'm confused because there appears to be a sign error. If the last term were $\langle \nabla_{E_{i}} \nabla f, \nabla_{E_{k}} E_{i} \rangle$ without the minus sign, then I could combine it with $-\langle \nabla_{E_{i}} \nabla f, \nabla_{E_{i}} E_{k} \rangle$ to get $$\langle \nabla_{E_{i}} \nabla f, \nabla_{E_{k}} E_{i} \rangle - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{i}} E_{k} \rangle = \langle \nabla_{E_{i}} \nabla f, [E_{k},E_{i}] \rangle$$ by symmetry of the Levi-Civita connection. Using symmetry of $\nabla^{2}f$, this yields $$\langle \nabla_{[E_{k},E_{i}]} \nabla f, E_{i} \rangle,$$ which is exactly the term I need to get $\langle R(E_{k},E_{i})\nabla f, E_{i}\rangle$ and then conclude.

Nonetheless, if I used a geodesic frame, then I could assume $\nabla_{E_{i}} E_{j} = 0$ at some point $p$ and then the whole computation goes through since the offending terms vanish and the $\nabla_{[E_{k},E_{i}]} \nabla f$ term would also vanish (again, symmetry of Levi-Civita). So what I have so far works if I use a geodesic frame. That seems weird: working backwards, this seems to mean $\langle \nabla_{E_{i}} \nabla f, \nabla_{E_{k}} E_{i} \rangle = - \langle \nabla_{E_{i}} \nabla f, \nabla_{E_{k}} E_{i} \rangle$ in the general case, which implies that quantity vanishes, but I can't see why it should.

Did I make a sign error above? If not, how do I complete the computation if I don't want to assume I'm working with a geodesic frame?