To calculate the entropy of a two dimensional hard disk gas, one can begin with the partition function[9]:
where,
are the position vectors and
are the momentum vectors. This reduces to
This needs to be divided by N! because the demon does not distinguish individual molecules, so
In terms of the partition, the entropy is
For a 2 dimensional gas,
Solving for the entropy, we get
Using Sterling's approximation for N!, we get
All quantities here are either known or arbitrary constants.