Derivations of the Boltzmann Distribution

Derivation by the Limit of the Bath's Heat Capacity In the Canonical Ensemble

In the Canonical ensemble the combined energy of the bath and system should be constant. The combination of the 2 makes a microcanonical ensemble. Let Wtotal(Etotal) be the number of accessable states when the total energy is equal to Etotal, and the same with Wbath and Wsys. Let the set of microstates of the system can be in Xsys, the microstates the bath can be in Xbath, and the total microstates Xtotal=Xbath×Xsys. The total energy should be the sum of the two energies plus a coupling energy.

Etotal=Ebath+Esys+Ecoupling

The total accessable states with an energy should be the total number combined number of states the bath and system can be in that sum to that energy.

Wtotal(Etotal)=rXWbath(EtotalEsys(r))

And in the microcanonical ensemble all microstates (rbath,rsys)Xtotal with the correct have an equal probaility.

p(rbath,rsys)=1Wtotal(Etotal)𝟙(Etotal=Esys(rsys)+Ebath(rbath))

We can calculate the probability of just the microstate for the system.

p(rsys)=rbathXbathp(rbath,rsys)
=rbathXbath1Wtotal(Etotal)𝟙(Etotal=Esys(rsys)+Ebath(rbath))
=Wbath(EtotalEsys(rsys))Wtotal(Etotal)

Take the natural log of both sides

ln(p(rsys))=ln(Wbath(EtotalEsys(rsys))Wtotal(Etotal))
ln(p(rsys))=ln(Wbath(EtotalEsys(rsys)))ln(Wtotal(Etotal))

Then we expand the logarithm to its Taylor series.

f(x+c)=f(x)+df(x)dxc+12d2f(x)dx2c2+16d3f(x)dx3c3+

We set f(x)=ln(Wbath(x)), x=Etotal, and c=Esys we get the following expression.

ln(p(rsys))=ln(Wbath(Etotal))dln(Wbath(Etotal))dEtotalEsys(rsys)
+12d2ln(Wbath(Etotal))dEtotal2Esys(rsys)216d3ln(Wbath(Etotal))dEtotal3Esys(rsys)3+
ln(Wtotal(Etotal))

In the limit that Etotal approaches Ebath the bath becomes a microcanonical ensemble and the entropy of the bath Sbath(Etotal)=Sbath(Ebath)=kBln(Wbath(Ebath))

=ln(Wbath(Ebath))1kBdSbath(Ebath)dEbathEsys(rsys)+12kBd2Sbath(Ebath)dEbath2Esys(rsys)2
16kBd3Sbath(Ebath)dEbath3Esys(rsys)3+ln(Wtotal(Etotal))

And by definition 1Tbath=dSbath(E)dE.

=ln(Wbath(Ebath))1kBTbathEsys(rsys)+12kBTbathdTbathdEbath2Esys(rsys)2
16kBTbathd2TbathdEbath2Esys(rsys)3+ln(Wtotal(Etotal))

Then if we assume the heat capacity of the bath is infinite so that dTbathdEbath=0 we can remove the extra terms.

ln(p(rsys))=1kBTbathEsys(rsys)+ln(Wbath(Ebath)Wtotal(Etotal))

Then exponentiate both sides.

p(rsys)=eEsys(rsys)kBTbath(Wtotal(Etotal)Wbath(Ebath))

And the denominator is just a normalizing factor so the final expression is below.

p(rsys)=eEsys(rsys)kBTbathrsysXsyseEsys(rsys)kBTbath

Derivation of the Boltzmann Distribution by Maximizing Entropy

Assume there are N discrete states the system can be in: X={x1xN}. Let pi=P(X=xi) sampling the state over an indefinite time period, and Ei be the energy in state xi. The system will have 2 contraints, the probabilities must add to 1, and the average energy, the internal energy, should equal U.

i=1Npi=1
i=1NpiEi=U

We will assume that S should be maximized.

S(p)=kBi=1Npiln(pi)

We want to find the probability distribution p=p1pn that maximizes S, while following the 2 constraints.

pmax=argmaxPS(p)

We can solve this system of equations with a Lagrange multiplier. First rewrite the 2 constraints like:

i=1Npi1=0

and

i=1NpiEiU=0

Then make the Lagrange multiplier equation

L(p,λ1,λ2)=kBi=1Npiln(pi)+λ1(i=1Npi1)+λ2(i=1NpiEiU)

At the maximum the derivative with respect to any pi should be zero.

L(p,λ1,λ2)pi=kB(ln(pi)pi1pi)+λ1+λ2Ei

Set the derivative to zero.

0=kB(ln(pi)pi1pi)+λ1+λ2Ei

Then Solve for pi.

ln(pi)=kB+λ1+λ2EikB

Exponentiate both sides

pi=ekB+λ1+λ2EikB

Then split the exponent.

pi=e1+λ1kBeλ2EikB

Now we have to solve for the 2 multipliers. Start with the first constraint:

i=1Npi=1

And substitute pi.

i=1Ne1+λ1kBeλ2EikB=1

The first term is independent of i so it can be moved out of the sum.

e1+λ1kBi=1Neλ2EikB=1

Then divide both sides by the sum.

e1+λ1kB=1i=1Neλ2EikB

Now e1+λ1kB can be substituted.

pi=eλ2EikBi=1Neλ2EikB

Next solve to solve for λ2 use the second constraint:

i=1NpiEi=U

Substitute in the equation for pi.

i=1Neλ2EikBj=1Neλ2EjkBEi=U

Look at the equation for the maximum entropy:

Smax(U)=maxPPUS(P)=kBi=1Npiln(pi)=i=1Neλ2EikBj=1Neλ2EjkBln(eλ2EikBk=1Neλ2EkkB)

Then simplify

Smax=kBi=1Neλ2EikBj=1Neλ2EjkBln(eλ2EikBk=1Neλ2EkkB)

Split the logarithm

Smax=kBi=1Neλ2EikBj=1Neλ2EjkB(ln(eλ2EikB)ln(k=1Neλ2EkkB))

Cancel the logarithm and exponent

Smax=kBi=1Neλ2EikBj=1Neλ2EjkB(λ2EikBln(k=1Neλ2EkkB))

Split the summation.

Smax=kBi=1Neλ2EikBj=1Neλ2EjkBln(k=1Neλ2EkkB)kBi=1Neλ2EikBj=1Neλ2EjkB(λ2EikB)

The second term in the first summation is independent so it can be moved out.

Smax=kBln(k=1Neλ2EkkB)i=1Neλ2EikBj=1Neλ2EjkBkBi=1Neλ2EikBj=1Neλ2EjkB(λ2EikB)

Then from the first constraint the entire first summation is just equal to 1.

Smax=kBln(k=1Neλ2EkkB)kBi=1Neλ2EikBj=1Neλ2EjkB(λ2EikB)

Move the λ2 out of the summation.

Smax=kBln(k=1Neλ2EkkB)kBλ2kBi=1Neλ2EikBj=1Neλ2EjkBEi

Then the summation is just equal to U.

Smax=kBln(k=1Neλ2EkkB)λ2U

Differentiate with respect to the internal energy.

SmaxU=kBln(k=1Neλ2EkkB)U(Uλ2)U

Chain rule on the left and product rule on the right.

SmaxU=kB(1k=1Neλ2EkkBk=1Neλ2EkkBU)λ2Uλ2U

The derivative operator distributes over addition.

SmaxU=kB(1k=1Neλ2EkkBk=1Neλ2EkkBU)λ2Uλ2U

Chain rule again.

SmaxU=kB(1k=1Neλ2EkkBk=1Neλ2EkkBEkkBλ2U)λ2Uλ2U
SmaxU=λ2Uk=1NEkeλ2EkkBk=1Neλ2EkkBλ2Uλ2U

And the expression is just internal energy again.

SmaxU=λ2UUλ2Uλ2U

Those cancel out.

SmaxU=λ2

So we have this expression which is the thermodynamic temperature.

λ2=SmaxU=1T

Because you define Smax with λ2 but then define λ2 as the derivative of Smax which creates a circular definition. For this part to be valid you must already know either the temperature (canonical ensemble) or the average energy.


Substituting, the full equation becomes

pi=e1kBTEii=1Ne1kBTEi