Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
where is the gradient of with respect to , is the Hessian of with respect to and is the Ricci curvature tensor. If is harmonic (i.e., , where is the Laplacian with respect to the metric ), Bochner's formula becomes
As a corollary, if is a Riemannian manifold without boundary and is a smooth, compactly supported function, then
.
This immediately follows from the first identity, observing that the integral of the left-hand side vanishes (by the divergence theorem) and integrating by parts the first term on the right-hand side.