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 ϵi be the energy in state xi. The system will have 2 contraints, the probabilities must add to 1, and the average energy should equal E:

i=1Npi=1

and

i=1Npiϵi=E

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=1NpiϵiE=0

Then make the Lagrange multiplier equation

L(p,λ1,λ2)=kBi=1Npiln(pi)+λ1(i=1Npi1)+λ2(i=1NpiϵiE)

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

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

Set the derivative to zero.

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

Then Solve for pi.

ln(pi)=kB+λ1+λ2ϵikB

Exponentiate both sides

pi=ekB+λ1+λ2ϵikB

Then split the exponent.

pi=e1+λ1kBeλ2ϵikB

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

i=1Npi=1

And substitute pi.

i=1Ne1+λ1kBeλ2ϵikB=1

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

e1+λ1kBi=1Neλ2ϵikB=1

Then divide both sides by the sum.

e1+λ1kB=1i=1Neλ2ϵikB

Now e1+λ1kB can be substituted.

pi=eλ2ϵikBi=1Neλ2ϵikB

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

i=1Npiϵi=E

Substitute in the equation for pi.

i=1Neλ2ϵikBj=1Neλ2ϵjkBϵi=E

Look at the equation for the maximum entropy:

Smax=S(Pmax)=i=1Npiln(pi)=i=1Neλ2ϵikBj=1Neλ2ϵjkBln(eλ2ϵikBk=1Neλ2ϵkkB)

Then simplify

Smax=i=1Neλ2ϵikBj=1Neλ2ϵjkBln(eλ2ϵikBk=1Neλ2ϵkkB)

Split the logarithm

Smax=i=1Neλ2ϵikBj=1Neλ2ϵjkB(ln(eλ2ϵikB)ln(k=1Neλ2ϵkkB))

Cancel the logarithm and exponent

Smax=i=1Neλ2ϵikBj=1Neλ2ϵjkB(λ2ϵikBln(k=1Neλ2ϵkkB))

Split the summation.

Smax=i=1Neλ2ϵikBj=1Neλ2ϵjkBln(k=1Neλ2ϵkkB)i=1Neλ2ϵikBj=1Neλ2ϵjkB(λ2ϵikB)

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

Smax=ln(k=1Neλ2ϵkkB)i=1Neλ2ϵikBj=1Neλ2ϵjkBi=1Neλ2ϵikBj=1Neλ2ϵjkB(λ2ϵikB)

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

Smax=ln(k=1Neλ2ϵkkB)i=1Neλ2ϵikBj=1Neλ2ϵjkB(λ2ϵikB)

Move the λ2 out of the summation.

Smax=ln(k=1Neλ2ϵkkB)λ2kBi=1Neλ2ϵikBj=1Neλ2ϵjkBϵi

Then the summation is just equal to E

Smax=ln(k=1Neλ2ϵk)λ2kBE

Then λ2 is equal to the derivative which is ends up being the definition of temperature.

λ2kB=SmaxE=1T

Substituting, the full equation becomes

pi=e1kBTϵii=1Ne1kBTϵi