# The partition function and relation to thermodynamics

In principle, we should derive the isothermal-isobaric partition function by coupling our system to an infinite thermal reservoir as was done for the canonical ensemble and also subject the system to the action of a movable piston under the influence of an external pressure $$P$$. In this case, both the temperature of the system and its pressure will be controlled, and the energy and volume will fluctuate accordingly.

However, we saw that the transformation from $$E$$ to $$T$$ between the microcanonical and canonical ensembles turned into a Laplace transform relation between the partition functions. The same result holds for the transformation from $$V$$ to $$T$$. The relevant energy'' quantity to transform is the work done by the system against the external pressure $$P$$ in changing its volume from $$V = 0$$ to $$V$$, which will be $$PV$$. Thus, the isothermal-isobaric partition function can be expressed in terms of the canonical partition function by the Laplace transform:

$\Delta(N,P,T) = {1 \over V_0} \int_0^{\infty} dV e^{-\beta PV} Q(N,V,T)$

where $$V_0$$ is a constant that has units of volume. Thus,

$\Delta (N,P,T) = {1 \over V_0 N! h^{3N}} \int_0^{\infty}dV \int d{\rm x}e^{-\beta (H({\rm x}) + PV)}$

The Gibbs free energy is related to the partition function by

$G(N,P,T) = -{1 \over \beta} \ln \Delta(N,P,T)$

This can be shown in a manner similar to that used to prove the $$A=-(1/\beta)\ln Q$$. The differential equation to start with is

$G = A + PV = A + P{\partial G \over \partial P}$

Other thermodynamic relations follow:

Volume:
$V = -kT\left({\partial \ln \Delta(N,P,T) \over \partial P}\right)_{N,T}$
Enthalpy:
$\bar{H} = \langle H({\rm x}) + PV\rangle = -{\partial \over \partial \beta} \ln \Delta(N,P,T)$
Heat capacity at constant pressure
$C_P = \left({\partial \bar{H} \over \partial T}\right)_{N,P} =k\beta^2 {\partial^2 \over \partial \beta}\ln \Delta(N,P,T)$
Entropy:
 $$S$$ $$-\left({\partial G \over \partial T}\right)_{N,P}$$ $$k\ln \Delta(N,P,T) + {\bar{H} \over T}$$

The fluctuations in the enthalpy $$\Delta \bar{H}$$ are given, in analogy with the canonical ensemble, by

$\Delta \bar{H} = \sqrt{kT^2 C_P}$

so that

${\Delta \bar{H} \over \bar{H} } = {\sqrt{kT^2 C_P} \over \bar{H}}$

so that, since $$C_P$$ and $$\bar {H}$$ are both extensive, $$\Delta \bar{H} /\bar{H} \sim 1/\sqrt{N}$$ which vanish in the thermodynamic limit.