2.3 Calculation of the canonical ensemble

Maximize

S′ = -k∑ ipi ln ⁡ (pi)

(2.10)

with the restrictions

U = ∑ ipiUiand1 = ∑ ipi.

(2.11)

The restrictions are handled by Lagrange parameters α and β:
Variation of the function

δ [S′-kα (∑ ipi - 1) -kβ (∑ ipiUi -U )] = 0

(2.12)

without restrictions leads to

- ln ⁡ (pi) - 1 -α -βUi = 0.

(2.13)

With

1 Z := exp ⁡ (-1 -α)

(2.14)

follows

Z(β,V,N) = ∑ i exp ⁡ (-βUi)andpi = 1 Z exp ⁡ (-βUi).

(2.15)

Z is called the canonical partition function (sum of states).
We get

U = ∑ ipiUi = ∑ i exp ⁡ (-βUi)Ui ∑ i exp ⁡ (-βUi) = - (∂ ln ⁡ (Z) ∂β ) := U(β,V,N)

(2.16)

and

S = -k∑ i [ 1 Z exp ⁡ (-βUi) (- ln ⁡ (Z) -βUi)] = k ln ⁡ (Z) + βkU

(2.17)

leading to:

dS k = (∂ ln ⁡ (Z) ∂β )dβ + (∂ ln ⁡ (Z) ∂N )dN + (∂ ln ⁡ (Z) ∂V )dV + Udβ + βdU = (∂ ln ⁡ (Z) ∂N )dN + (∂ ln ⁡ (Z) ∂V )dV + βdU

(2.18)
This means

S = S(V,N,U)

(2.19)

and S is the Legendre transformed of k ln ⁡ (Z).
We define

(∂S ∂U ) := 1 Tand getβ = 1 kT.

(2.20)

Comparison of

TS = kT ln ⁡ (Z) + βkTUandF(V,N,T) = U -TS

(2.21)

gives

F = -kT ln ⁡ (Z(V,N,T)).

(2.22)

In statistical mechanics the calculation of the thermodynamic potentials is transformed into the calculation of partition functions.