Recently, I saw the following formula for the noncommutativity of the d'Alembert operator $\Box$ acting on the covariant derivative of a scalar field in general relativity, $\Box (\nabla_{\mu}\phi)\nabla_{\mu}\Box\phi=R_{\mu\nu}\nabla^{\nu}\phi$. How exactly it is derived, considering the metric compatibility and that $\phi$ is a scalar function depending on time?
Use $$ [\nabla_\mu,\nabla_\nu]V^\rho=R_{\mu\nu}{}^{\rho\sigma} V_\sigma $$ to conclude that $$ \begin{aligned} {}[\nabla^\nu\nabla_\nu,\nabla_\mu]\phi&\overset{ \mathrm A}=\nabla^\nu[\nabla_\nu,\nabla_\mu]\phi+[\nabla^\nu,\nabla_\mu]\nabla_\nu\phi\\ &\overset{ \mathrm B}=0+R_{\mu\nu}{}^{\nu\sigma} \nabla_\sigma\phi\\ &\overset{ \mathrm C}=R_{\mu\nu}\nabla^\nu\phi \end{aligned} $$
Note that in $\mathrm A$ we have used the fact that covariant derivatives commute with contractions, in $\mathrm B$ we have used $[\nabla_\nu,\nabla_\mu]\phi=[\partial_\nu,\partial_\mu]\phi=0$ (assuming a torsionfree connection), and in $\mathrm C$ we have used the definition of $R_{\mu\nu}$ as the contraction of the Riemann tensor.

Thanks, interesting approach from quantum mechanics as operators. I have seen that it works also if we take into account that $\nabla^{\mu}\nabla_{\nu}\phi=\nabla_{\nu}\nabla^{\mu}\phi$ for a scalar field in the first term, the term $\nabla_{\mu}\nabla_{\nu}\nabla^{\mu}\phi$ becomes $\nabla_{\mu}\nabla^{\mu}\nabla_{\nu}\phi$. – Mikey Mike Mar 15 '17 at 17:03

Hi @MikeyMike, Im not sure what you mean by quantum mechanics. All I used is standard differential geometry, with no reference to QM. The use of commutators, $[\nabla_\mu,\nabla_\nu]=\nabla_\mu\nabla_\nu\nabla_\nu,\nabla_\mu$ is very common when discussing the Riemann tensor. It is ordinary, oldschool, differential geometry, not quantum mechanics. – AccidentalFourierTransform Mar 15 '17 at 17:11