# Integrating Carnahan-Starling Pressure

Given the Carnahan-Starling equation of state for a solution of hard-spheres, $$Z = \frac{P}{\rho k_BT} = \frac{1 + \eta + \eta^2 - \eta^3}{(1-\eta)^3}$$ where $$\rho = N/V$$ is the number density and $$\eta = \frac{\pi}{6}\sigma^3 \rho$$ is the sphere packing fraction, one can use the relationship between the pressure and Helmholtz free energy $$F$$, $$P = -\left ( \frac{\partial F}{\partial V} \right )_{T,V} = -\left ( \frac{\partial F}{\partial (N/\rho)} \right )_{T,V} = -\left ( \frac{\partial F}{\partial (N\rho/\rho^2 )} \right )_{T,V} = -\frac{\rho^2}{N} \left ( \frac{\partial F}{\partial V} \right )_{T,V}$$ and integrate this expression with respect to density to obtain the Helmholtz free energy, \begin{align*} F &= -\int_0^{\rho'} \frac{N}{\rho^2}P \ d\rho \\ &= -Nk_BT \int_0^{\rho'} \frac{\rho}{\rho^2}\frac{1 + \eta + \eta^2 - \eta^3}{(1-\eta)^3} \ d\rho \\ &= -Nk_BT \int_0^{\rho'} \frac{1}{\rho}\frac{1 + \eta + \eta^2 - \eta^3}{(1-\eta)^3} \ d\rho \\ &= -Nk_BT \int_0^{\eta'} \frac{1}{\eta}\frac{1 + \eta + \eta^2 - \eta^3}{(1-\eta)^3} \ d\eta \end{align*} where I have used the substitution $$\rho = \frac{6}{\pi\sigma^3}\eta$$. However in this last step, Attard ($$\textit{Thermodynamics and Statistical Mechanics: Equilibrium by Entropy Maximisation}$$, p. 202), arrives at

$$Nk_BT \int_0^{\eta'} \frac{1}{\eta}\left (\frac{1 + \eta + \eta^2 - \eta^3}{(1-\eta)^3} - 1 \right ) \ d\eta$$

which appears critical to actually evaluating the integral to obtain the correct form of $$F$$. I cannot understand where the $$-1$$ term comes from or how Attard gets rid of the negative sign in front of the integral. I feel as if I am missing something obvious. Where have I gone wrong?

• Great question (and answer), I was just asking myself the same thing! +1
– Pxx
Dec 6, 2018 at 22:21

## 1 Answer

That's two questions!

1. What about the minus sign? That goes away because $$\frac{\partial V}{\partial \rho} = -\frac{\rho^2}{N}$$, which means that $$P = \frac{\rho^2}{N}\left( \frac{\partial F}{\partial \rho}\right)_{T,V}$$ (without the - sign).
2. What about the $$-1$$? Well, Attard is interested in the excess free energy, that is, the total free energy minus the ideal gas contribution. However, the Carnahan-Starling expression for $$Z$$ includes the ideal gas part. By adding $$-1$$ to it, that contribution is taken away (since $$Z = 1$$ for the ideal gas), so that we are left with just the excess free energy.