3.3 Rudiments of thermodynamics 77
The total number of states for the whole system, therefore, is
({N})=
∏
G. (3.13)
Substituting (3.13) into (3.11), we find that the maximal possible entropy of the
system with thegiven energy spectrum{N}is
S({N})=
∑
lnG. (3.14)
Let us assume thatN andg are much larger than unity. Using Stirling’s
formula,
lnN!=
∑N
n= 1
lnn≈
∫N
1
lnxdx+
1
2
lnN=
(
N+
1
2
)
lnN−N, (3.15)
we find from (3.12) and (3.14) that, to leading order,
S({N})≡S({n})=
∑
[(n+ 1 )ln( 1 +n)−nlnn]g, (3.16)
wheren≡N/gare called occupation numbers. They characterize the aver-
age number of particles per microstate of asingleparticle. The entropy depends
on the energy spectrum{n}and we want to maximize it subject to the given total
energy
E({n})=
∑
N=
∑
ng, (3.17)
and total number of particles
N({n})=
∑
N=
∑
ng. (3.18)
To extremize (3.16) with the two extra constraints (3.17) and (3.18), we apply the
method of Lagrange multipliers. The variation of expression
S({n})+λ 1 E({n})+λ 2 N({n})
with respect tonvanishes for
n=
1
exp(−λ 1 −λ 2 )− 1
. (3.19)
Given spectrum (3.19), the Lagrange multipliersλ 1 and λ 2 are the parame-
ters which allow us to satisfy the constraints. They can be expressed in terms
ofEandN,or, instead, in terms of temperatureT≡− 1 /λ 1 and chemical potential