# Gradient of a functional

Given a compact manifold with a Riemannian metric $g$, we define the total scalar curvature by $$E(g)=\int_M RdV$$

Let us consider the first variation of $E$ under an arbitrary change of metric. We write $h=\frac{\partial g}{\partial t}$.

One can derive that $$\frac{d}{dt} \int_M RdV=\int_M \langle\frac{R}{2}g-Ric, h\rangle dV$$

Question: In "Lectures On The Ricci Flow" by Peter Topping, $\nabla E(g)=\frac{R}{2}g-Ric$ is concluded by above derivation, where $\nabla E$ is gradient of $E$.

Can anyone help me to understand how he gets the result?

Thanks.

This is just the usual definition of gradient of a functional in a Hilbert space. That is you define something as $T = \nabla E(g)$ (whose existence comes from Riesz Representation Theorem) if you have $$\frac{d}{dt}(E(g)) = \langle T, \frac{dg}{dt}\rangle_H$$ where $(H, \langle .\rangle_H)$ is the Hilbert space. In this case it is $L^2$ where $\langle A,B \rangle_H = \int_M \langle A,B\rangle dV$. So after you derive your stated formulae from evolution of $R$ and $dV$ the definition gives you $\nabla E(g) = (R/2)g - Ric(g)$