[proofplan]
Let $I \subset \mathbb{R}$ denote the time interval of the Ricci flow. We prove the formula locally in an arbitrary coordinate chart, because equality of densities can be checked in coordinates. First we differentiate the coordinate expression for the [Riemannian volume density](/page/Riemannian%20Volume%20Density), using the determinant derivative identity [Jacobi's formula](/page/Jacobi%27s%20Formula), where $G(t,p)$ is the matrix of metric coefficients, and obtain the local identity
\begin{align*}
\partial_t d\mu_{g(t)} = \frac{1}{2}\operatorname{tr}\bigl(G(t,p)^{-1}\partial_tG(t,p)\bigr)d\mu_{g(t)}.
\end{align*}
Then we identify this matrix trace with the metric trace of $\partial_t g(t)$, insert the [Ricci flow](/page/Ricci%20Flow) equation $\partial_t g(t) = -2\operatorname{Ric}_{g(t)}$, and use the definition of [scalar curvature](/page/Scalar%20Curvature) as the metric trace of the [Ricci tensor](/page/Ricci%20Curvature).
[/proofplan]
[step:Differentiate the local expression for the Riemannian volume density]
Let $I \subset \mathbb{R}$ denote the time interval of the Ricci flow. Let $(U,\varphi)$ be a coordinate chart on $M$ with coordinate functions $(x_1,\dots,x_n)$. Let $\operatorname{Sym}_n(\mathbb{R})$ denote the [vector space](/page/Vector%20Space) of real symmetric $n \times n$ matrices. Define the metric coefficient map $G: I \times U \to \operatorname{Sym}_n(\mathbb{R})$ by
\begin{align*}
G(t,p) := \bigl(g_{ij}(t,p)\bigr)_{i,j=1}^n,
\end{align*}
where the coefficient functions $g_{ij}: I \times U \to \mathbb{R}$ are given by
\begin{align*}
g_{ij}(t,p) := g(t)_p(\partial_{x_i}|_p,\partial_{x_j}|_p).
\end{align*}
Since $g(t)$ is a Riemannian metric, $G(t,p)$ is symmetric positive definite, so $\det G(t,p)>0$. In these coordinates the [Riemannian volume density](/page/Riemannian%20Volume%20Density) is
\begin{align*}
d\mu_{g(t)} = \bigl(\det G(t,p)\bigr)^{1/2}|dx_1 \wedge \cdots \wedge dx_n|.
\end{align*}
Define the variation coefficient map $H: I \times U \to \operatorname{Sym}_n(\mathbb{R})$ by
\begin{align*}
H(t,p) := \partial_tG(t,p) = \bigl(\partial_t g_{ij}(t,p)\bigr)_{i,j=1}^n.
\end{align*}
For each fixed $p \in U$, the path $G(\cdot,p): I \to \operatorname{Sym}_n(\mathbb{R})$ is differentiable because $g(t)$ is a smooth one-parameter family of Riemannian metrics, and it is invertible because $G(t,p)$ is positive definite. All time derivatives below are taken for $t$ in the interior of $I$; if $I$ contains an endpoint, the same identities hold there with the corresponding one-sided time derivative. By the determinant derivative identity [Jacobi's formula](/page/Jacobi%27s%20Formula), for an invertible differentiable matrix path $A(t)$, the determinant derivative is
\begin{align*}
\frac{d}{dt}\det A(t) = \det A(t)\operatorname{tr}\bigl(A(t)^{-1}A'(t)\bigr).
\end{align*}
Applying this identity to $A(t)=G(t,p)$ gives
\begin{align*}
\partial_t\bigl(\det G(t,p)\bigr)
= \det G(t,p)\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr).
\end{align*}
Therefore
\begin{align*}
\partial_t\bigl(\det G(t,p)\bigr)^{1/2}
= \frac{1}{2}\bigl(\det G(t,p)\bigr)^{-1/2}\partial_t\bigl(\det G(t,p)\bigr).
\end{align*}
Substituting the determinant derivative identity gives
\begin{align*}
\partial_t\bigl(\det G(t,p)\bigr)^{1/2}
= \frac{1}{2}\bigl(\det G(t,p)\bigr)^{1/2}\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr).
\end{align*}
Since $|dx_1 \wedge \cdots \wedge dx_n|$ is independent of $t$, we obtain
\begin{align*}
\partial_t d\mu_{g(t)}
= \frac{1}{2}\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr)d\mu_{g(t)}.
\end{align*}
[guided]
We check the formula in coordinates because a density is determined by its coordinate coefficient and its transformation law is already built into the Riemannian volume density. Let $I \subset \mathbb{R}$ denote the time interval of the Ricci flow. Choose an arbitrary coordinate chart $(U,\varphi)$ with coordinate functions $(x_1,\dots,x_n)$. Let $\operatorname{Sym}_n(\mathbb{R})$ denote the vector space of real symmetric $n \times n$ matrices. Define the matrix of metric coefficients as the map $G: I \times U \to \operatorname{Sym}_n(\mathbb{R})$ given by
\begin{align*}
G(t,p) := \bigl(g_{ij}(t,p)\bigr)_{i,j=1}^n,
\end{align*}
where each coefficient is the function $g_{ij}: I \times U \to \mathbb{R}$ defined by
\begin{align*}
g_{ij}(t,p) := g(t)_p(\partial_{x_i}|_p,\partial_{x_j}|_p).
\end{align*}
Because $g(t)$ is a Riemannian metric, the matrix $G(t,p)$ is symmetric positive definite. In particular $\det G(t,p)>0$, so the square root of the determinant is smooth in $t$.
In this chart the [Riemannian volume density](/page/Riemannian%20Volume%20Density) has the coordinate expression
\begin{align*}
d\mu_{g(t)} = \bigl(\det G(t,p)\bigr)^{1/2}|dx_1 \wedge \cdots \wedge dx_n|.
\end{align*}
Thus the entire problem is reduced to differentiating the scalar factor $(\det G(t,p))^{1/2}$ with respect to $t$.
Define the variation coefficient map $H: I \times U \to \operatorname{Sym}_n(\mathbb{R})$ by
\begin{align*}
H(t,p) := \partial_tG(t,p) = \bigl(\partial_t g_{ij}(t,p)\bigr)_{i,j=1}^n.
\end{align*}
All time derivatives in this computation are taken for $t$ in the interior of $I$; if $I$ contains an endpoint, the same computation gives the corresponding one-sided derivative at that endpoint. We use the determinant derivative identity [Jacobi's formula](/page/Jacobi%27s%20Formula), for an invertible differentiable matrix path $A(t)$:
\begin{align*}
\frac{d}{dt}\det A(t) = \det A(t)\operatorname{tr}\bigl(A(t)^{-1}A'(t)\bigr).
\end{align*}
The hypotheses of this identity are satisfied with $A(t)=G(t,p)$, since $G(t,p)$ is differentiable in $t$ and invertible because it is positive definite. Hence
\begin{align*}
\partial_t\bigl(\det G(t,p)\bigr)
= \det G(t,p)\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr).
\end{align*}
Now apply the ordinary chain rule to the positive function $s_p: I \to (0,\infty)$ defined, for the fixed point $p \in U$, by $s_p(t) := \det G(t,p)$. Since $s_p(t)>0$,
\begin{align*}
\partial_t s_p(t)^{1/2}
= \frac{1}{2}s_p(t)^{-1/2}\partial_t s_p(t).
\end{align*}
Substituting $s_p(t)=\det G(t,p)$ and using the determinant derivative just obtained gives
\begin{align*}
\partial_t\bigl(\det G(t,p)\bigr)^{1/2}
= \frac{1}{2}\bigl(\det G(t,p)\bigr)^{-1/2}\partial_t\bigl(\det G(t,p)\bigr).
\end{align*}
Substituting the determinant derivative formula yields
\begin{align*}
\partial_t\bigl(\det G(t,p)\bigr)^{1/2}
= \frac{1}{2}\bigl(\det G(t,p)\bigr)^{-1/2}
\det G(t,p)\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr).
\end{align*}
Cancelling the factor $\bigl(\det G(t,p)\bigr)^{-1/2}\det G(t,p)$ gives
\begin{align*}
\partial_t\bigl(\det G(t,p)\bigr)^{1/2}
= \frac{1}{2}\bigl(\det G(t,p)\bigr)^{1/2}
\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr).
\end{align*}
The coordinate density $|dx_1 \wedge \cdots \wedge dx_n|$ does not depend on $t$, so differentiating the coordinate expression for $d\mu_{g(t)}$ gives
\begin{align*}
\partial_t d\mu_{g(t)}
= \frac{1}{2}\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr)d\mu_{g(t)}.
\end{align*}
This is the local form of the general volume variation identity.
[/guided]
[/step]
[step:Identify the matrix trace with the metric trace of $\partial_t g(t)$]
Let $g^{ij}(t,p)$ denote the entries of the inverse matrix $G(t,p)^{-1}$. The coordinate trace from the previous step is
\begin{align*}
\operatorname{tr}\bigl(G(t,p)^{-1}H(t,p)\bigr)
= \sum_{i,j=1}^n g^{ij}(t,p)\,\partial_t g_{ij}(t,p).
\end{align*}
This is exactly the metric trace of the symmetric covariant $2$-tensor $\partial_t g(t)$:
\begin{align*}
\operatorname{tr}_{g(t)}(\partial_t g(t))
:= \sum_{i,j=1}^n g^{ij}(t,p)\,\partial_t g_{ij}(t,p).
\end{align*}
Hence, on $U$,
\begin{align*}
\partial_t d\mu_{g(t)}
= \frac{1}{2}\operatorname{tr}_{g(t)}(\partial_t g(t))d\mu_{g(t)}.
\end{align*}
Because the chart $(U,\varphi)$ was arbitrary, this density identity holds on all of $M$.
[/step]
[step:Insert the Ricci flow equation and take the metric trace]
For each $t \in I$, let $\operatorname{Ric}_{g(t)}$ denote the Ricci curvature tensor of the Riemannian metric $g(t)$, viewed as a smooth covariant $2$-tensor on $M$. Let $R_{g(t)}$ denote the scalar curvature of $g(t)$, defined by
\begin{align*}
R_{g(t)} := \operatorname{tr}_{g(t)}\operatorname{Ric}_{g(t)}.
\end{align*}
Since $g(t)$ satisfies the [Ricci flow](/page/Ricci%20Flow) equation,
\begin{align*}
\partial_t g(t) = -2\operatorname{Ric}_{g(t)}.
\end{align*}
Taking the metric trace with respect to $g(t)$ gives
\begin{align*}
\operatorname{tr}_{g(t)}(\partial_t g(t))
= \operatorname{tr}_{g(t)}\bigl(-2\operatorname{Ric}_{g(t)}\bigr).
\end{align*}
By linearity of the metric trace,
\begin{align*}
\operatorname{tr}_{g(t)}\bigl(-2\operatorname{Ric}_{g(t)}\bigr)
= -2\operatorname{tr}_{g(t)}\operatorname{Ric}_{g(t)}.
\end{align*}
Using the definition of [scalar curvature](/page/Scalar%20Curvature) as the metric trace of the [Ricci tensor](/page/Ricci%20Curvature), this becomes
\begin{align*}
\operatorname{tr}_{g(t)}(\partial_t g(t))
= -2R_{g(t)}.
\end{align*}
Substituting this trace identity into the general volume variation formula yields
\begin{align*}
\partial_t d\mu_{g(t)}
= \frac{1}{2}\operatorname{tr}_{g(t)}(\partial_t g(t))d\mu_{g(t)}.
\end{align*}
Using
\begin{align*}
\operatorname{tr}_{g(t)}(\partial_t g(t)) = -2R_{g(t)}
\end{align*}
gives
\begin{align*}
\partial_t d\mu_{g(t)}
= \frac{1}{2}(-2R_{g(t)})d\mu_{g(t)}.
\end{align*}
Therefore
\begin{align*}
\partial_t d\mu_{g(t)}
= -R_{g(t)}d\mu_{g(t)}.
\end{align*}
This proves the desired formula for every $t \in I$.
[/step]