Stirling Approximation and Entropy of Mixing

How good is Stirling's approximation for ln(x!), and what does it give for the configurational entropy of mixing atoms and vacancies?

Instructions for use

Stirling approximation against ln(x!)

Entropy of mixing

Exact: S = k·ln(ω) = k·ln(N! / NA! NB!)
Stirling: S = −k·N·(XA ln XA + XB ln XB)
Physics of the problem

The entropy of a state is given by Boltzmann's relation, \(S = k\ln\omega\), where \(\omega\) is the number of microscopic arrangements. If \(N_A\) atoms of one kind and \(N_B\) of another (or \(N_B\) vacancies) are distributed over \(N = N_A + N_B\) lattice sites, the number of distinguishable arrangements is

\( \omega = \dfrac{N!}{N_A!\,N_B!} \)

For macroscopic \(N\) (of the order of \(10^{23}\)) the factorials cannot be evaluated directly. Stirling's approximation replaces them:

\( \ln x! \approx x\ln x - x \)

Substituting, the terms linear in \(x\) cancel because \(N = N_A + N_B\), and with the site fractions \(X_A = N_A/N\) and \(X_B = N_B/N\):

\( S = -kN\,\big(X_A\ln X_A + X_B\ln X_B\big) \)

This is the ideal configurational entropy of mixing, the starting point for the thermodynamics of solutions and of point defects. The entropy is largest for \(X_A = X_B = 1/2\) and is zero for a pure material. Its infinite slope at \(X\to 0\) is the reason that a crystal always contains some vacancies at equilibrium.

The approximation has a relative error of about \(\ln(2\pi x)/(2x\ln x)\), which is large for small \(x\) and falls steadily. For \(x\) of a few hundred the error is already below 1%, and for the numbers of atoms in real materials it is negligible. The plots show the error directly.

Glossary
Factorial, x!
The product 1×2×…×x.
ω
Number of distinguishable arrangements (microstates) of the system.
Configurational entropy
The entropy that arises from the number of ways of arranging the atoms (or vacancies) over the sites.
XA, XB
Fractions of sites occupied by A atoms and by B atoms (or vacancies). On the plot the horizontal axis is the vacancy fraction.
Parity plot
A plot of an approximate value against the exact value. Perfect agreement lies on the line y = x.
k
Boltzmann constant. Entropy is plotted in units of k.