PARTIAL DIFFERENTIATION
A system contains a very large numberNof particles, each of which can be in any ofR
energy levels with a corresponding energyEi,i=1, 2 ,...,R. The number of particles in the
ith level isniand the total energy of the system is a constant,E. Find the distribution of
particles amongst the energy levels that maximises the expression
P=
N!
n 1 !n 2 !···nR!
,
subject to the constraints that both the number of particles and the total energy remain
constant, i.e.
g=N−
∑R
i=1
ni=0 and h=E−
∑R
i=1
niEi=0.
The way in which we proceed is as follows. In order to maximiseP, we must minimise
its denominator (since the numerator is fixed). Minimising the denominator is the same as
minimising the logarithm of the denominator, i.e.
f=ln(n 1 !n 2 !···nR!)=ln(n 1 !)+ln(n 2 !)+···+ln(nR!).
Using Stirling’s approximation, ln(n!)≈nlnn−n, we find that
f=n 1 lnn 1 +n 2 lnn 2 +···+nRlnnR−(n 1 +n 2 +···+nR)
=
(R
∑
i=1
nilnni
)
−N.
It has been assumed here that, for the desired distribution, all theniare large. Thus, we
now have a functionfsubject to two constraints,g=0andh= 0, and we can apply the
Lagrange method, obtaining (cf. (5.31))
∂f
∂n 1
+λ
∂g
∂n 1
+μ
∂h
∂n 1
=0,
∂f
∂n 2
+λ
∂g
∂n 2
+μ
∂h
∂n 2
=0,
..
.
∂f
∂nR
+λ
∂g
∂nR
+μ
∂h
∂nR
=0.
Since all these equations are alike, we consider the general case
∂f
∂nk
+λ
∂g
∂nk
+μ
∂h
∂nk
=0,
fork=1, 2 ,...,R. Substituting the functionsf,gandhinto this relation we find
nk
nk
+lnnk+λ(−1) +μ(−Ek)=0,
which can be rearranged to give
lnnk=μEk+λ− 1 ,
and hence
nk=CexpμEk.