# Deriving the change in the Helmholtz free energy in the context of the free energy perturbation method

I am reading Free Energy Calculations: Theory and Applications in Chemistry and Biology by Chipot and Pohorille. At the beginning of the text (page 19, for example), the authors define the Helmholtz free energy $A$ and changes $\Delta A$ in it for two states (states 0 and 1):

\begin{align} A&=-\beta^{-1} \ln Q(N, V, T) \;\;\;\textbf{(1.14)} \\ \Delta A&=-\beta^{-1} \ln \frac{Q_1}{Q_0} \;\;\;\textbf{(1.15)} \\ \Delta A&=-\beta^{-1} \ln \frac{Z_1}{Z_0} \;\;\;\textbf{(1.16)} \end{align}

where $Q_i$ is a partition function:

$$Q_i = \frac{1}{N! h^{3N}} \int_{\Gamma_i} \exp[-\beta \mathcal{H}(d\vec{x}, d\vec{p})] d\vec{x} d\vec{p}_x$$

and $Z_i$ is a configurational integral:

$$Z_i = \int_{\Gamma_i} \exp[-\beta U(\vec{x})] d\vec{x}$$

where $U$ is the potential energy.

Next (page 20), the authors write a derivation for $\Delta A$, in the framework of free energy perturbation (FEP):

Equation (1.15) indicates that our ultimate focus in calculating $\Delta A$ is on determining the ratio $Q_1/Q_0$, or equivilently $Z_1/Z_0$, rather than on individual partition functions. On the basis of computer simulations, this can be done in several ways. One approach consists of transforming (1.16) as follows:

\begin{align} \Delta A&=-\beta^{-1} \ln \frac{\int \exp[-\beta U_1(\vec{x})] d\vec{x}}{\int \exp[-\beta U_0(\vec{x})] d\vec{x}} \\ &=-\beta^{-1} \ln \exp\left\{-\beta [U_1(\vec{x}) - U_0(\vec{x})]\right\} P_0(\vec{x}) \\ &=-\beta^{-1} \ln \langle \exp\left\{-\beta [U_1(\vec{x}) - U_0(\vec{x})]\right\} \rangle_{0} \end{align}

Here, the systems 0 and 1 are described by the potential energy functions, $U_0(\vec{x})$ and $U_1(\vec{x})$, respectively. Generalization to conditions in which systems 0 and 1 are at two different temperatures is straight forward. $\beta_0$ and $\beta_1$ are equal to $(k_B T_0)^{-1}$ and $(k_B T_1)^{-1}$, respectively. $P_0(\vec{x})$ is the probability density function of finding system 0 in the microstate defined by positions $\vec{x}$ of the particles:

$$P_0(\vec{x}) = \frac{\exp[-\beta_0 U_0(\vec{x})]}{Z_0} \;\;\;\textbf{(1.19)}$$

My question is, what happened to the integrals in going from (1.18) to the next step? $P_0(\vec{x})$ only contains an integral in its denominator (i.e., in $Z_0$), and not also in the numerator. Could you please perhaps provide one more step between equation (1.18) and the equation that immediately follows it? Thanks for your time.

There has to be an integral missing in your book citation, line 2 of $\Delta A =\ldots$ should read $\Delta A = \beta^{-1} \ln \left[\int \exp{-\beta[U_1(\vec x) - U_0(\vec x)]} P_0(\vec x) d \vec x \right]$. Other than that, the calculation is as follows:
\begin{align*} \Delta A &=-\beta^{-1} \ln \frac{\int \exp[-\beta U_1(\vec{x})] d\vec{x}}{\int exp[-\beta U_0(\vec{x})] d\vec{x}} \\ \\ &= -\beta^{-1} \ln \frac{\int \exp[-\beta U_1(\vec{x})] \frac{\exp(\beta U_0(\vec x))}{\exp(\beta U_0(\vec x))} d\vec{x}}{\int \exp[-\beta U_0(\vec{x})] d\vec{x}} \\ \\ &= -\beta^{-1} \ln \frac{\int \exp[-\beta [U_1(\vec{x}) - U_0(\vec x)]] \exp[-\beta U_0(\vec x)] d\vec{x}}{\int \exp[-\beta U_0(\vec{x})] d\vec{x}} \\ \\ &= -\beta^{-1} \ln \frac{\int \exp[-\beta [U_1(\vec{x}) - U_0(\vec x)]] \exp[-\beta U_0(\vec x)] d\vec{x}}{Z_0} \\ \\ &= -\beta^{-1} \ln \int \exp[-\beta [U_1(\vec{x}) - U_0(\vec x)]] p_0(\vec x) d\vec{x} \\ \\ &= -\beta^{-1} \ln \langle\exp[-\beta [U_1(\vec{x}) - U_0(\vec x)]] \rangle \end{align*}
Long, faulty latex story short: multiply the integrand in the nominator by $1=\frac{\exp[\beta U_0(\vec x)]}{\exp[\beta U_0(\vec x)]}$, unite the two "top" exponentials, convert $\frac{1}{\exp[\beta U_0(\vec x)]} = \exp[-\beta U_0(\vec x)]$ which , with $Z_0$ from the big denominator, gives $P_0(\vec x)$ and write the integral as the ensemble average.