TITLE: Critical point of Mabuchi energy functional has zero scalar curvature
QUESTION [5 upvotes]: I am currently reading the proof of convergence of Kähler-Ricci flow in the case $c_1(M)=0$ from Song, Weinkove. On page 45 he defines the term Mabuchi's $K$-energy functional:
$$ \frac{d}{dt}\mathrm{Mab}_{\omega_0}(\phi_t)=-\int_M\dot{\phi}_tR_{\phi_t}\omega_{\phi_t}^n$$
on the space:
$$\mathrm{PSH}(M, \omega_0)=\left\{\phi\in C^\infty(M)\mid \omega_0+\frac{\sqrt{-1}}{2\pi}\partial\bar{\partial}\phi>0\right\}$$
and where $\omega_{\phi_t}=\omega_0+\frac{\sqrt{-1}}{2\pi}\partial\bar{\partial}\phi_t$ and $R_{\phi_t}$ is the scalar curvature of $\omega_{\phi_t}$.  
Then he directly claims that if $\phi_\infty$ is a critical point of $\mathrm{Mab}_{\omega_0}$ then $\omega_\infty$ has zero scalar curvature. I do not see why is that so. I am not an expert in this realm, so I might miss some well-known facts or obvious results. 
Any comment is welcome!

REPLY [2 votes]: $\newcommand{\dd}{\partial}$It's a fundamental idiom of the calculus of variations that if $\int fg = 0$ for all $f$, then $g \equiv 0$.
The first displayed equation in your question isn't the Mabuchi energy itself, but the variation of the Mabuchi energy along an arbitrary path of smooth Kähler metrics. At a critical point, the variation vanishes (by definition) for all $\dot{\phi}_{t}$. Consequently,
$$
-\int_{M} \dot{\phi}_{\infty} R_{\infty}\, \omega_{\infty}^{n} = 0
\quad\text{for all $\dot{\phi}_{\infty}$,}
$$
namely, for every path through $\omega_{\infty}$ with $\dot{\omega}_{\infty} = \frac{i}{2\pi}\dd\bar{\dd} \dot{\phi}_{\infty}$. By the fundamental idiom, $R_{\infty} \equiv 0$, i.e., $\omega_{\infty}$ has vanishing scalar curvature.