I came across an issue which bugs me.

Considering an ideal gas of $N$ non-interacting particles on a $1D$ container of length $L$, its (configurational) entropy $S$ reads $$ S = kT \ln \Big(\frac{L^N}{N!} \Big) = kT N \Big( \ln (\frac{L}{N})+1 \Big)$$ the last step being justified by Stirling's approximation for large $N$. The configurational entropy is all there is in this system, no energy contribution for the free energy.

The particles are non-interacting so one would assume that the entropy would grow as the number of particles increases.

Yet that is not the case: $S$ is not monotonic, and $$ \frac{\partial S}{\partial N} = -kT \ln \Big( \frac{L}{N}\Big) $$ equals $0$ for $N = L$, whatever (positive) $T$.

So if one puts the box of side $L$ in contact with a particle reservoir, from which partciles can come and go without penalties, $N$ particles are required to minimise the free energy.

This is most surprising, and it comes from having included the $N!$ term in the denominator of the entropy expression. A rather significant change: without $N!$ term the entropy grows monotonically with $N$.

But how come? Where does this limit on the number of particles comes from, if they are non-interacting? I would expect, the more of them, the higher the entropy.


following requests for clarification, I add details on howthe formula in question is derived. The partition function $Z_1$for an "energyless" particle (no interactions, no kinetic energy) in a 1D box of length $L$ is given by $$ Z_1 = \int_0^L \exp{-(\frac{0}{kT}}) \mathrm{d}x = L$$ As we have $N$ independent indistinguishable particles, the overall partition function $Z$ equals $$ Z = \frac{Z_1^N}{N!}$$ As there is no energy, the free energy equals $-TS$, and the relationship betwwem $Z$ and free is the final step.

  • $\begingroup$ How has the temperature dependence disappeared in expanding $\ln \left(\frac{L}{N!}\right)$ using Stirling's approximation? $\endgroup$ Nov 20, 2017 at 17:51
  • $\begingroup$ @BySymmetry, corrected, a typo. The point should remain that the maximum of the entropy occurs for a temperature-independent $N$. $\endgroup$
    – Smerdjakov
    Nov 20, 2017 at 17:54
  • $\begingroup$ Where did you get the formula? There's clearly something wrong with the units, as $L$ is a length and $N$ is nondimensional. You probably need to insert something like the thermal wavelength, which may make clearer where your formula is valid. I'm also not sure about the minus sign in front, which does not appear in the 3D version $\endgroup$
    – John Donne
    Nov 20, 2017 at 18:07

1 Answer 1


Notice that you have the wrong formula. For a 1D ideal gas the 1-particle partition function is given by

$$Z_1 = \frac{1}{2\pi\hbar} \int dq dp \exp{\left(-\frac{1}{kT}\frac{p^2}{2m}\right)} = \frac{L}{\lambda}$$

where $\lambda = \sqrt{2\pi\hbar^2/mkT}$ is the thermal wavelength and $L$ is the length of the system. Therefore for $N$ indistiguishable particles, the partition function is given by: $$ Z = \frac{Z_1^N}{N!}$$ In the canonical ensemble, the entropy is given by $$S = \frac{\partial}{\partial T} (kT \log Z)$$ After some calculations, one gets the formula: $$S=k\left[\log{\frac{L^N}{\lambda^N N!}}+ \frac{N}{2} \right]$$ Applying Stirling's approximation, $\log{N!}\approx N\log{N}-N$ one obtains the correct formula: $$S=k N \left[\log{\frac{L}{\lambda N}}+ \frac{3}{2} \right]$$ And therefore its derivative: $$\left(\frac{\partial S}{\partial N}\right)_{T,V} = k \left[\log{\frac{L}{\lambda N}}+ \frac{1}{2} \right]>0$$ so the entropy does increase with the number of particles.

As to the other part of your question, that's not actually what it means to maximise entropy. Given a system with fixed $L,N$ and average energy (in the case of the canonical ensemble) the entropy is maximised by a certain distribution, and you get the formula that is the one above. You don't extremise with respect to $N$.

  • $\begingroup$ I am not convinced by your answer, although I see I should have been clearer. The partition function you compute contains momentum and position contributions, while the system I described is characterised by position only (no kinetic energy). I doubt I have the wrong formula. With regards to the second part of your comment, what prevents me from minimising with respect to N, in a grand canonical ensemble? $\endgroup$
    – Smerdjakov
    Nov 21, 2017 at 1:12
  • $\begingroup$ I don't understand what you mean by entropy. Wikipedia ( en.wikipedia.org/wiki/Configuration_entropy ) says that "configurational entropy" is given by the Gibbs formula, which in this case reduces to the above. How did you obtain your formula? For the second part: in the grand canonical ensemble, you don't simply maximise S, but you need to add constraints (among which fixing the average N) so the partial derivative of S wrt N is not zero. $\endgroup$
    – John Donne
    Nov 21, 2017 at 1:33
  • $\begingroup$ Gibbs Entropy formula does not reduce st all to the above, as there is no momentum in this system. I will detail how I obtained the formula tomorrow. As far as your second comment, itbis the first time i hear about the necessity to fix the average N in the grand canonical ensemble, I will do some further study here. $\endgroup$
    – Smerdjakov
    Nov 21, 2017 at 2:05
  • 1
    $\begingroup$ thanks for all your help @John Donne, can I just ask one more question, why would the derivative $( \frac{ \partial S }{\partial N}) _{T,V} $ be positive (last equation in your reply)? As $N$ grows the logarithm will get negative $\endgroup$
    – Smerdjakov
    Apr 27, 2019 at 19:36
  • $\begingroup$ Ok it guess it has to do with the the approximation, valud for $\frac{L}{\lambda N} 》 1$ $\endgroup$
    – Smerdjakov
    Apr 28, 2019 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.