# Canonical ensemble

The canonical ensemble (also canonical ensemble or NVT ensemble ) is defined in statistical physics as the set of all similar systems with the same number of particles in an equally large volume that can exchange energy with a reservoir and, together with this, an overall system in the thermal state Form equilibrium with a temperature . The system under consideration can consist of one or more particles or it can be a thermodynamic many-particle system. The energy of the system can change within the scope of statistical fluctuations due to interactions with the heat bath. The reservoir is a heat bath ; H. it has a predetermined temperature and is so much larger than the system under consideration that it is not significantly influenced by the interactions with it. ${\ displaystyle N}$${\ displaystyle V}$ ${\ displaystyle T}$${\ displaystyle T}$

Each of the similar systems combined in the ensemble occupies one of the many micro-states in which the particles in the volume together with the heat bath realize an overall system in a state of equilibrium at the given temperature. Taken together, these microstates form the canonical state , to which they contribute depending on the frequency with which they occur in thermal equilibrium. This frequency is given by the Boltzmann factor . Classically, the canonical state is described by the distribution of the micro-states in the phase space of the system, i.e. by a density function that depends on all independent variables of all parts or particles of the system under consideration. The quantum mechanical description is carried out with the density operator . ${\ displaystyle N}$${\ displaystyle V}$ ${\ displaystyle \ mathbf {\ rho}}$

If the system consists of many particles, then because of the thermal contact with the heat bath it is a thermodynamic system in thermal equilibrium at the same temperature. Among the copies of the system assembled in the ensemble, all micro-states are then represented in which the particles realize the same through a fixed macrostate . His internal energy is not a fixed size, but by the expected value given the energy of the system: . All macroscopic thermodynamic quantities can also be calculated as expected values ​​over the ensemble, but also the size of their statistical fluctuations. As a state of equilibrium, the canonical state has the highest entropy that is compatible with the given parameters . ${\ displaystyle N}$${\ displaystyle N, \; V, \; T}$ ${\ displaystyle U}$${\ displaystyle U = \ langle E \ rangle}$${\ displaystyle S (\ rho)}$${\ displaystyle N, \, V, \, \ langle E \ rangle}$

## Canonical state

### Quantum mechanics

The density matrix of the canonical state of a given system is

${\ displaystyle {\ varvec {\ rho}} = {\ frac {1} {Z (\ beta)}} e ^ {- \ beta {\ varvec {H}}} = {\ frac {1} {Z ( \ beta)}} \ sum _ {n} | \ Psi _ {n} \ rangle \ mathrm {e} ^ {- \ beta E_ {n}} \ langle \ Psi _ {n} |}$.

It is the Hamiltonian of the system, an energy own state with the energy , while the index undergoes a complete basis of eigenstates. The normalization factor is the canonical partition function${\ displaystyle {\ boldsymbol {H}}}$${\ displaystyle | \ Psi _ {n} \ rangle}$${\ displaystyle E_ {n}}$${\ displaystyle n}$

${\ displaystyle Z (\ beta) = \ operatorname {Tr} \ left (e ^ {- \ beta {\ boldsymbol {H}}} \ right) = \ sum _ {n} e ^ {- \ beta E_ {n }}}$

The parameter turns out to be the inverse temperature by comparison with classical thermodynamics : ${\ displaystyle \ beta}$

${\ displaystyle \ beta = {\ frac {1} {k _ {\ mathrm {B}} T}}}$

The factor represents the Boltzmann factor . ${\ displaystyle \ mathrm {e} ^ {- \ beta {\ boldsymbol {H}}}}$

The trace of an operator is defined as follows:, where the state vectors form any complete orthonormal system of the states of the system. The track is independent of the choice of this basic system. The trace of the canonical state is 1, because in the energy eigenbase the associated density matrix is ​​diagonal with the eigenvalues ${\ displaystyle \ operatorname {Tr} (A) = \ sum \ nolimits _ {m} \ langle m | A | m \ rangle}$${\ displaystyle \ left \ {| m \ rangle \ right \}}$

${\ displaystyle \ rho _ {nn} = \ langle \ Psi _ {n} | {\ boldsymbol {\ rho}} | \ Psi _ {n} \ rangle = {\ frac {e ^ {- \ beta E_ {n }}} {\ sum _ {n} e ^ {- \ beta E_ {n}}}}}$.

In the case of degenerate energy eigenvalues ​​(degrees of degeneracy ), summands of the canonical sum of states can be summarized in such a way that all the different energies are summed up: ${\ displaystyle g_ {l}}$${\ displaystyle Z}$${\ displaystyle E_ {l}}$

${\ displaystyle Z (\ beta) = \ sum _ {n} e ^ {- \ beta E_ {n}} = \ sum _ {l} g_ {l} \, e ^ {- \ beta E_ {l}} }$

While the sum over the index counts all states, the sum with the index only runs over the energy level. ${\ displaystyle n}$${\ displaystyle l}$

### Classic

The classical canonical state results analogously (phase space density)

${\ displaystyle \ rho = {\ frac {1} {Z (\ beta)}} e ^ {- \ beta H ({\ vec {x}} _ {1}, {\ vec {p}} _ {1 }, \, ... \ ,, {\ vec {x}} _ {N}, {\ vec {p}} _ {N})}}$

with the classic Hamilton function

${\ displaystyle H ({\ vec {x}} _ {1}, {\ vec {p}} _ {1}, \, ... \ ,, {\ vec {x}} _ {N}, { \ vec {p}} _ {N})}$

and the canonical partition function

${\ displaystyle Z (\ beta) = \ int \ mathrm {d} \ tau \; e ^ {- \ beta H ({\ vec {x}} _ {1}, {\ vec {p}} _ {1 }, \, ... \ ,, {\ vec {x}} _ {N}, {\ vec {p}} _ {N})}}$

With

${\ displaystyle \ mathrm {d} \ tau = {\ frac {1} {\ xi}} {\ frac {1} {h ^ {3N}}} \; d ^ {3} x_ {1} d ^ { 3} p_ {1} \, ... \, d ^ {3} x_ {N} d ^ {3} p_ {N}}$

for the volume element of the phase space.

For identical particles, the factor prevents the multiple counting of indistinguishable particles . For different types of particles with particle numbers and is the factor . ${\ displaystyle N}$${\ displaystyle \ xi = N!}$${\ displaystyle n}$${\ displaystyle N_ {1}, ..., N_ {n}}$${\ displaystyle \ sum _ {i = 1} ^ {n} N_ {i} = N}$${\ displaystyle \ xi = N_ {1}! \, ... \, N_ {n}!}$

The Planck's constant enters this classic expression as size of the phase space cell each degree of freedom of the particles. In classical statistical physics, this is initially arbitrary and is only introduced for dimensional reasons. But it turned out to be the same as Planck's quantum of action, when the likewise classic Sackur-Tetrode equation for the entropy of the ideal gas could be adapted to experimental data. ${\ displaystyle h}$

The canonical partition function can be expressed with the phase space volume for fixed energy ( microcanonical density of states ): ${\ displaystyle Z}$${\ displaystyle \ Omega (E)}$

${\ displaystyle Z (\ beta) = \ int _ {0} ^ {\ infty} \ mathrm {d} E \ int \ mathrm {d} \ tau \, \ delta \! \ left (EH ({\ vec { x}} _ {1}, {\ vec {p}} _ {1}, \ ldots, {\ vec {x}} _ {N}, {\ vec {p}} _ {N}) \ right) e ^ {- \ beta E} = \ int _ {0} ^ {\ infty} \ mathrm {d} E \, \ Omega (E) \, e ^ {- \ beta E}}$

Thus the canonical partition function is the Laplace transform of the microcanonical density of states . Since the Laplace transform is reversibly unique, both functions contain identical information. ${\ displaystyle \ Omega (E)}$

### A derivation of the Boltzmann factor

The heat bath (index 2) and the system of interest (index 1) have weak energetic contact. Together they form an overall system that is completely closed off from the outside and therefore has to be described microcanonically .

The Hamilton operator of the overall system is , where is the Hamilton operator of the subsystems and the interaction operator . The latter of the subsystems is indeed required for equilibration, assuming the weak contact but over and be neglected , d. H. the interaction energy is much smaller than the energy of the individual systems. Thus, we consider two practically independent systems. Then the energy is additive and the density matrix is ​​multiplicative . Entropy is due to additive also: . Furthermore: and . ${\ displaystyle H = H_ {1} + H_ {2} + W}$${\ displaystyle H_ {i}}$${\ displaystyle W}$${\ displaystyle H_ {1}}$${\ displaystyle H_ {2}}$${\ displaystyle W \ ll H_ {1}, H_ {2}}$${\ displaystyle H \ approx H_ {1} + H_ {2}}$${\ displaystyle E = E_ {1} + E_ {2}}$${\ displaystyle \ rho = \ rho _ {1} \ rho _ {2}}$${\ displaystyle \ langle \ ln \ rho \ rangle = \ langle \ ln \ rho _ {1} \ rangle + \ langle \ ln \ rho _ {2} \ rangle}$${\ displaystyle S = S_ {1} + S_ {2}}$${\ displaystyle V = V_ {1} + V_ {2}}$${\ displaystyle N = N_ {1} + N_ {2}}$

The total energy always remains constant:

${\ displaystyle E _ {{\ text {ges}} \,} = E_ {1} + E_ {2}}$

The energy of the heating bath is -fold degenerate, the energy of the coupled system is -fold degenerate. The degree of degeneration of the overall system to energy is ${\ displaystyle E_ {2} = E _ {\ text {ges}} - E_ {1}}$${\ displaystyle g_ {2} (E_ {2})}$${\ displaystyle E_ {1}}$${\ displaystyle g_ {1} (E_ {1})}$${\ displaystyle E _ {\ text {ges}}}$

${\ displaystyle g_ {12} (E _ {\ text {ges}}) = \ sum _ {E_ {1} ^ {\ prime} = 0} ^ {E _ {\ text {ges}}} g_ {1} ( E_ {1} ^ {\ prime}) \, g_ {2} (E _ {\ text {ges}} - E_ {1} ^ {\ prime})}$.

In the micro-canonical ensemble, every possible base state has the same probability . The probability that the system 1 has the energy is equal to the probability that the thermal bath has the energy ; this is the quotient of the total degree of degeneration to the energy of system 1, namely , and the total degree of degeneration : ${\ displaystyle 1 / g_ {12} (E _ {\ text {ges}})}$${\ displaystyle p_ {1} (E_ {1})}$${\ displaystyle E_ {1}}$${\ displaystyle p_ {2} (E_ {2})}$${\ displaystyle E _ {\ text {ges}} - E_ {1}}$${\ displaystyle E_ {1}}$${\ displaystyle g_ {1} (E_ {1}) \, g_ {2} (E _ {\ text {ges}} - E_ {1})}$${\ displaystyle g_ {12} (E _ {\ text {ges}})}$

${\ displaystyle p_ {1, E} (E_ {1}) = p_ {2} (E_ {2}) = {\ frac {g_ {1} (E_ {1}) \, g_ {2} (E_ { \ text {ges}} - E_ {1})} {g_ {12} (E _ {\ text {ges}})}}}$

So far, questions have been asked about the probability that system 1 has a certain energy . The probability of finding system 1 in a certain base state with energy is: ${\ displaystyle p_ {1, E}}$${\ displaystyle E_ {1}}$${\ displaystyle p_ {1, Z}}$${\ displaystyle E_ {1}}$

${\ displaystyle p_ {1, Z} (E_ {1}) = {\ frac {p_ {1} (E_ {1})} {g_ {1} (E_ {1})}} = {\ frac {g_ {2} (E _ {\ text {ges}} - E_ {1})} {g_ {12} (E _ {\ text {ges}})}}}$

${\ displaystyle p_ {1, Z}}$ is therefore simply proportional to the number of states of system 2 with the appropriate energy:

${\ displaystyle p_ {1, Z} (E_ {1}) = X \; g_ {2} (E _ {\ text {ges}} - E_ {1})}$

The constant of proportionality is obtained later simply from normalizing all to 1. ${\ displaystyle X}$${\ displaystyle p_ {Z}}$

The number of states in system 2 in question is approximated by a Taylor expansion of the logarithm:

${\ displaystyle \ ln [g_ {2} (E _ {\ text {ges}} - E_ {1})] \ approx \ ln [g_ {2} (E _ {\ text {ges}})] - {\ frac {\ partial \ ln (g_ {2})} {\ partial E _ {\ text {ges}}}} E_ {1} = \ ln [g_ {2} (E _ {\ text {ges}})] - \ beta E_ {1}}$. It was used that the derivation of the entropy according to the energy is the inverse temperature (see micro-canonical ensemble ). ${\ displaystyle \ beta}$

Inserting it into the equation for gives: ${\ displaystyle p_ {1, Z}}$

${\ displaystyle p_ {1, Z} (E_ {1}) = X \; g_ {2} (E _ {\ text {ges}}) \, \ mathrm {e} ^ {- E_ {1} / k_ { \ text {B}} T} = X '\; \ mathrm {e} ^ {- E_ {1} / k _ {\ text {B}} T}}$

As a correction to the above development, i.e. in order , the following factor occurs: ${\ displaystyle E_ {1} ^ {2}}$

${\ displaystyle {\ frac {1} {2}} {\ frac {\ partial ^ {2} S_ {2} (E_ {2})} {\ partial ^ {2} E_ {2}}} = {\ frac {1} {2}} {\ frac {\ partial T ^ {- 1}} {\ partial E_ {2}}} = - {\ frac {1} {2}} {\ frac {1} {T ^ {2}}} {\ frac {\ partial T} {\ partial E_ {2}}} = - {\ frac {1} {2T ^ {2}}} \ left ({\ frac {\ partial E_ { 2}} {\ partial T}} \ right) ^ {- 1} = - {\ frac {1} {2T ^ {2} C_ {2}}}}$

Here is the heat capacity of the heating bath. The correction terms can be neglected, because as the size of the heat bath increases, they tend towards zero. It is therefore justified to restrict oneself to the first order of development. ${\ displaystyle C_ {2}}$

The standardization

${\ displaystyle \ sum _ {\ text {all states}} p_ {1Z} = 1}$

simply provides the inverse partition function for the normalization factor

${\ displaystyle X ^ {*} = 1 / Z}$,

with which the end result is:

${\ displaystyle p_ {1Z} (E_ {1}) = {\ frac {1} {Z}} e ^ {- E_ {1} / k _ {\ text {B}} T}}$.

The size is called the Boltzmann factor. ${\ displaystyle e ^ {- E / k _ {\ text {B}} T}}$

### General derivation

The equilibrium state with a fixed expected value (s) can be understood as a variation problem and can be derived using the Lagrange multiplier method. We are looking for the density operator whose statistical entropy is maximum, taking into account constraints: ${\ displaystyle {\ boldsymbol {\ rho}}}$${\ displaystyle S ({\ boldsymbol {\ rho}})}$

The expression should be maximized with the secondary conditions (normalization condition) and (defined expected value of any operator ). The following functional of the density operator has to be maximized : ${\ displaystyle S ({\ varvec {\ rho}}) / k _ {\ mathrm {B}} = - \ operatorname {Tr} ({\ varvec {\ rho}} \ ln {\ varvec {\ rho}}) }$${\ displaystyle \ operatorname {Tr} ({\ varvec {\ rho}}) = 1}$${\ displaystyle \ langle {\ varvec {O}} \ rangle = \ operatorname {Tr} ({\ varvec {\ rho}} {\ varvec {O}}) = O_ {0}}$${\ displaystyle {\ boldsymbol {O}}}$

${\ displaystyle L ({\ varvec {\ rho}}, \ lambda, {\ tilde {\ lambda}}) = - \ operatorname {Tr} ({\ varvec {\ rho}} \ ln {\ varvec {\ rho }}) - {\ tilde {\ lambda}} \ left (\ operatorname {Tr} ({\ varvec {\ rho}}) - 1 \ right) - \ lambda \ left (\ operatorname {Tr} ({\ varvec {\ rho O}}) - O_ {0} \ right)}$

A stationary solution is obtained when the first variation of vanishes. ${\ displaystyle L}$

${\ displaystyle 0 = \ delta L (\ rho, \ lambda, {\ tilde {\ lambda}}) = - \ delta \ operatorname {Tr} ({\ varvec {\ rho}} \ ln {\ varvec {\ rho }}) - {\ tilde {\ lambda}} \, \ delta \ operatorname {Tr} ({\ varvec {\ rho}}) - \ lambda \, \ delta \ operatorname {Tr} ({\ varvec {\ rho O}}) = - \ operatorname {Tr} \ left ((\ ln {\ varvec {\ rho}} + 1 + {\ tilde {\ lambda}} + \ lambda {\ varvec {O}}) \ delta { \ boldsymbol {\ rho}} \ right)}$

The relation was used in the last step . Calculating the track results in: ${\ displaystyle \ delta \ operatorname {Tr} \ left (f (\ rho) \ right) = \ operatorname {Tr} \ left (f '(\ rho) \, \ delta \ rho \ right)}$

${\ displaystyle 0 = \ sum _ {m} \ langle m | (\ ln {\ varvec {\ rho}} + 1 + {\ tilde {\ lambda}} + \ lambda {\ varvec {O}}) \ delta {\ varvec {\ rho}} | m \ rangle = \ sum _ {m, n} \ langle m | \ ln {\ varvec {\ rho}} + 1 + {\ tilde {\ lambda}} + \ lambda { \ boldsymbol {O}} | n \ rangle \ langle n | \ delta {\ boldsymbol {\ rho}} | m \ rangle}$

wherein the and each form a complete orthonormal basis ; the sum over describes the trace formation , the sum over is the insertion of a unit operator (making use of the completeness). ${\ displaystyle | m \ rangle}$${\ displaystyle | n \ rangle}$${\ displaystyle m}$${\ displaystyle n}$${\ displaystyle \ mathbf {1}}$

In order for this equation to be true for any variation , every term in the double sum must be zero, and that requires . This means: ${\ displaystyle \ delta {\ boldsymbol {\ rho}}}$${\ displaystyle \ langle m | \ ln {\ boldsymbol {\ rho}} + 1+ \ lambda {\ boldsymbol {O}} + {\ tilde {\ lambda}} | n \ rangle = 0}$

${\ displaystyle \ ln {\ varvec {\ rho}} + 1+ \ lambda {\ varvec {O}} + {\ tilde {\ lambda}} = 0}$

This gives the density operator . ${\ displaystyle {\ boldsymbol {\ rho}}}$

${\ displaystyle {\ boldsymbol {\ rho}} = e ^ {- 1 - {\ tilde {\ lambda}} - \ lambda {\ boldsymbol {O}}} = {\ frac {1} {e ^ {1+ {\ tilde {\ lambda}}}}} e ^ {- \ lambda {\ boldsymbol {O}}}}$

Since the track is normalized to 1, it follows

${\ displaystyle e ^ {1 + {\ tilde {\ lambda}}} = \ operatorname {Tr} \ left (e ^ {- \ lambda {\ varvec {O}}} \ right)}$

With the Hamilton operator and the denominator becomes the partition function${\ displaystyle {\ varvec {O}} = {\ varvec {H}}}$${\ displaystyle \ lambda = \ beta (= 1 / k _ {\ mathrm {B}} T)}$${\ displaystyle e ^ {1 + {\ tilde {\ lambda}}} = \ operatorname {Tr} \ left (e ^ {- \ beta {\ varvec {H}}} \ right) = Z}$

from this the Boltzmann-Gibbs state follows

${\ displaystyle {\ varvec {\ rho}} = {\ frac {1} {Z}} e ^ {- \ beta {\ varvec {H}}}}$.

From this derivation by means of the calculus of variations only the stationary behavior of the entropy follows; the presence of the maximum can be shown with the Gibbs inequality (see below).

This procedure can be extended to several constraints. If there is a further secondary condition, the state of equilibrium of the grand canonical ensemble is obtained . ${\ displaystyle \ langle {\ boldsymbol {N}} \ rangle = N}$

## Expected values

In the following, expected values ​​of various macroscopic sizes are formed. The Hamilton operator is dependent on the volume and the number of particles , the partition function of temperature, volume and number of particles, respectively . The formulas for the classical canonical ensemble are obtained from those given for the quantum physical ensemble, by executing the integral over the phase space instead of the sum over the natural energy states. ${\ displaystyle H (V, N)}$${\ displaystyle Z (T, V, N)}$${\ displaystyle Z (\ beta, V, N)}$

### energy

The expected energy value can be calculated using the sum of conditions

{\ displaystyle {\ begin {aligned} E & = \ langle {\ varvec {H}} \ rangle = \ operatorname {Tr} ({\ varvec {H \ rho}}) = {\ frac {1} {Z}} \ operatorname {Tr} \ left ({\ varvec {H}} e ^ {- \ beta {\ varvec {H}}} \ right) \\ & = {\ frac {1} {Z}} \ operatorname {Tr } \ left (- {\ frac {\ partial} {\ partial \ beta}} e ^ {- \ beta {\ boldsymbol {H}}} \ right) = - {\ frac {1} {Z}} {\ frac {\ partial} {\ partial \ beta}} \ operatorname {Tr} \ left (e ^ {- \ beta {\ boldsymbol {H}}} \ right) = - {\ frac {1} {Z}} { \ frac {\ partial} {\ partial \ beta}} Z \\ & = - {\ frac {\ partial} {\ partial \ beta}} \ ln Z \ end {aligned}}}

### entropy

The statistical entropy can now be expressed by the partition function

{\ displaystyle {\ begin {aligned} S & = - k _ {\ mathrm {B}} \ langle \ ln {\ boldsymbol {\ rho}} \ rangle = -k _ {\ mathrm {B}} \ operatorname {Tr} ( {\ boldsymbol {\ rho}} \ ln {\ boldsymbol {\ rho}}) \\ & = - k _ {\ mathrm {B}} \ left \ langle \ ln \ left ({\ frac {1} {Z} } e ^ {- \ beta {\ varvec {H}}} \ right) \ right \ rangle = -k _ {\ mathrm {B}} \ langle - \ ln (Z) - \ beta {\ varvec {H}} \ rangle = k _ {\ mathrm {B}} \ ln Z + k _ {\ mathrm {B}} \ beta \ langle {\ varvec {H}} \ rangle \\ & = k _ {\ mathrm {B}} \ ln Z-k _ {\ mathrm {B}} \ beta {\ frac {\ partial} {\ partial \ beta}} \ ln Z \\ & = k _ {\ mathrm {B}} \ ln Z + k _ {\ mathrm { B}} T {\ frac {\ partial} {\ partial T}} \ ln Z = k _ {\ mathrm {B}} {\ frac {\ partial} {\ partial T}} (T \ ln Z) \ end {aligned}}}

### pressure

The printer maintenance value is the same:

{\ displaystyle {\ begin {aligned} p & = - \ left \ langle {\ frac {\ partial {\ boldsymbol {H}}} {\ partial V}} \ right \ rangle = - \ operatorname {Tr} \ left ( {\ frac {\ partial {\ boldsymbol {H}}} {\ partial V}} {\ boldsymbol {\ rho}} \ right) = - {\ frac {1} {Z}} \ operatorname {Tr} \ left ({\ frac {\ partial {\ boldsymbol {H}}} {\ partial V}} e ^ {- \ beta {\ boldsymbol {H}}} \ right) \\ & = - {\ frac {1} { Z}} \ operatorname {Tr} \ left ({\ frac {1} {- \ beta}} {\ frac {\ partial} {\ partial V}} e ^ {- \ beta {\ boldsymbol {H}}} \ right) = {\ frac {1} {Z}} {\ frac {1} {\ beta}} {\ frac {\ partial} {\ partial V}} \ underbrace {\ operatorname {Tr} \ left (e ^ {- \ beta {\ boldsymbol {H}}} \ right)} _ {Z} = {\ frac {1} {\ beta}} {\ frac {\ frac {\ partial Z} {\ partial V}} {Z}} \\ & = {\ frac {1} {\ beta}} {\ frac {\ partial} {\ partial V}} \ ln Z \ end {aligned}}}

### Chemical potential

The chemical potential can also be calculated for large systems (the number of particles is a discrete quantity; only in the thermodynamic limit can quasi-continuous treatment and derivations are possible): ${\ displaystyle N}$${\ displaystyle N}$${\ displaystyle N}$

{\ displaystyle {\ begin {aligned} \ mu & = \ left \ langle {\ frac {\ partial {\ boldsymbol {H}}} {\ partial N}} \ right \ rangle = \ operatorname {Tr} \ left ( {\ frac {\ partial {\ boldsymbol {H}}} {\ partial N}} {\ boldsymbol {\ rho}} \ right) = {\ frac {1} {Z}} \ operatorname {Tr} \ left ( {\ frac {\ partial {\ boldsymbol {H}}} {\ partial N}} e ^ {- \ beta {\ boldsymbol {H}}} \ right) \\ & = {\ frac {1} {Z} } \ operatorname {Tr} \ left ({\ frac {1} {- \ beta}} {\ frac {\ partial} {\ partial N}} e ^ {- \ beta {\ boldsymbol {H}}} \ right ) = - {\ frac {1} {Z}} {\ frac {1} {\ beta}} {\ frac {\ partial} {\ partial N}} \ underbrace {\ operatorname {Tr} \ left (e ^ {- \ beta {\ boldsymbol {H}}} \ right)} _ {Z} = - {\ frac {1} {\ beta}} {\ frac {\ frac {\ partial Z} {\ partial N}} {Z}} \\ & = - {\ frac {1} {\ beta}} {\ frac {\ partial} {\ partial N}} \ ln Z \ end {aligned}}}

## Free energy

### Free energy for states of equilibrium

Obviously, the logarithm of the partition function plays an important role in the calculation of expected values. That is why one defines the free energy :

${\ displaystyle F (\ beta, V, N): = - {\ frac {1} {\ beta}} \ ln Z_ {k} = E_ {k} - {\ frac {1} {k _ {\ mathrm { B}} \ beta}} S_ {k}}$

Or. using the temperature instead of the parameter : ${\ displaystyle T}$${\ displaystyle \ beta}$

${\ displaystyle F (T, V, N): = - k _ {\ mathrm {B}} T \, \ ln Z_ {k} = E_ {k} -T \, S_ {k}}$

### Free energy as thermodynamic potential

The free energy is the thermodynamic potential of the canonical state. The above expected values ​​can now be written compactly as a gradient of the potential:

${\ displaystyle {\ begin {pmatrix} -S_ {k} \\ - p_ {k} \\\ mu _ {k} \ end {pmatrix}} = {\ begin {pmatrix} \ partial _ {T} \\ \ partial _ {V} \\\ partial _ {N} \ end {pmatrix}} F (T, V, N)}$

The total differential of the free energy is thus:

${\ displaystyle \ mathrm {d} F = -S \, \ mathrm {d} Tp \, \ mathrm {d} V + \ mu \, \ mathrm {d} N}$

### General definition of free energy

The free energy can also be defined for non-equilibrium states, namely as a functional of the density operator via

${\ displaystyle F [{\ varvec {\ rho}}] = \ operatorname {Tr} \! \ left \ {{\ varvec {\ rho}} \ left ({\ varvec {H}} + \ beta ^ {- 1} \ ln {\ boldsymbol {\ rho}} \ right) \ right \}}$

or reshaped

${\ displaystyle F [{\ varvec {\ rho}}] = \ operatorname {Tr} \! \ left \ {{\ varvec {\ rho}} {\ varvec {H}} \ right \} + k _ {\ mathrm {B}} T \, \ operatorname {Tr} \! \ Left \ {{\ varvec {\ rho}} \ ln {\ varvec {\ rho}} \ right \} = E [{\ varvec {\ rho} }] - T \, S [{\ boldsymbol {\ rho}}]}$

In equilibrium with or one obtains the above equilibrium definition of the free energy: ${\ displaystyle {\ varvec {\ rho}} _ {k} = Z ^ {- 1} e ^ {- \ beta {\ varvec {H}}}}$${\ displaystyle \ ln {\ varvec {\ rho}} _ {k} = - \ ln Z- \ beta {\ varvec {H}}}$

${\ displaystyle F [{\ varvec {\ rho}} _ {k}] = \ operatorname {Tr} \! \ left \ {{\ varvec {\ rho}} \ left ({\ varvec {H}} - { \ boldsymbol {H}} - \ beta ^ {- 1} \ ln Z \ right) \ right \} = - \ beta ^ {- 1} \ ln Z \, \ operatorname {Tr} \! \ left \ {{ \ boldsymbol {\ rho}} \ right \} = - \ beta ^ {- 1} \ ln Z}$

## State with extreme properties

### Maximum of entropy

Let it be the density operator of the state of equilibrium and another density operator that does not necessarily represent a state of equilibrium, but provides the same expected energy value : ${\ displaystyle {\ varvec {\ rho}} = Z ^ {- 1} e ^ {- \ beta {\ varvec {H}}}}$${\ displaystyle {\ boldsymbol {\ rho '}}}$${\ displaystyle E}$

${\ displaystyle E = \ operatorname {Tr} ({\ varvec {\ rho}} {\ varvec {H}}) = \ operatorname {Tr} ({\ varvec {\ rho}}} '{\ varvec {H}} )}$.

It can be shown that there can be no greater entropy than . According to the Gibbs inequality for any two operators with track 1: ${\ displaystyle {\ boldsymbol {\ rho}} '}$${\ displaystyle S}$${\ displaystyle {\ boldsymbol {\ rho}}}$

${\ displaystyle - \ operatorname {Tr} \! \ left [{\ varvec {\ rho}} '\ ln {\ varvec {\ rho}}' \ right] \ leq - \ operatorname {Tr} \! \ left [ {\ boldsymbol {\ rho}} '\ ln {\ boldsymbol {\ rho}} \ right]}$

The left side is

${\ displaystyle - \ operatorname {Tr} \! \ left [{\ varvec {\ rho}} '\ ln {\ varvec {\ rho}}' \ right] = {\ frac {1} {k _ {\ mathrm { B}} T}} S [{\ boldsymbol {\ rho}} ']}$.

The right side can be calculated:

${\ displaystyle - \ operatorname {Tr} \! \ left [{\ varvec {\ rho}} '\ ln {\ varvec {\ rho}} \ right] = - \ operatorname {Tr} \! \ left [{\ boldsymbol {\ rho}} '\ cdot (\ ln Z + \ beta {\ boldsymbol {H}}) \ right] = - \ underbrace {\ ln Z} _ {- \ beta F} \, \ underbrace {\ operatorname { Tr} \! \ Left [{\ varvec {\ rho}} '\ right]} _ {1} + \ beta \, \ underbrace {\ operatorname {Tr} \! \ Left [{\ varvec {\ rho}} '{\ boldsymbol {H}} \ right]} _ {E} = - \ beta (-F + E) = {\ frac {1} {k _ {\ mathrm {B}} T}} S [{\ boldsymbol {\ rho}}]}$

With the Gibbs inequality it follows:

${\ displaystyle S [{\ varvec {\ rho}}] \ leq S [{\ varvec {\ rho}} _ {0}]}$

The canonical ensemble consequently has the maximum entropy of all ensembles with the same average energy and fixed volume and particle number.

### Minimum of free energy

The general definition of free energy is used here. ${\ displaystyle F [{\ varvec {\ rho}}] = E [{\ varvec {\ rho}}] - T \, S [{\ varvec {\ rho}}]}$

For a state that does not correspond to the equilibrium state but delivers the same expected energy value , the following applies: ${\ displaystyle {\ varvec {\ rho}} \ neq {\ varvec {\ rho}} _ {k}}$${\ displaystyle {\ boldsymbol {\ rho}} _ {k}}$${\ displaystyle E [{\ varvec {\ rho}}] = E [{\ varvec {\ rho}} _ {k}]}$

${\ displaystyle F [{\ varvec {\ rho}}] - F [{\ varvec {\ rho}} _ {k}] = \ left (E [{\ varvec {\ rho}}] - T \, S [{\ varvec {\ rho}}] \ right) - \ left (E [{\ varvec {\ rho}} _ {k}] - T \, S [{\ varvec {\ rho}} _ {k} ] \ right) = T \ left (S [{\ varvec {\ rho}} _ {k}] - \, S [{\ varvec {\ rho}}] \ right)> 0}$

d. H. the free energy is minimal in equilibrium.

## Fluctuations

### Fluctuation in energy

Since in the canonical ensemble it is not the energy but only the expected energy value that is fixed, certain fluctuations are possible. In the following, the square of the fluctuation range of the energy around its expected value is calculated: ${\ displaystyle \ Delta E}$${\ displaystyle E}$

{\ displaystyle {\ begin {aligned} \ left (\ Delta E \ right) ^ {2} & = \ left \ langle \ left ({\ varvec {H}} - \ langle {\ varvec {H}} \ rangle \ right) ^ {2} \ right \ rangle = \ langle {\ varvec {H}} ^ {2} \ rangle - \ langle {\ varvec {H}} \ rangle ^ {2} = {\ frac {1} {Z}} \ operatorname {Tr} \ left ({\ varvec {H}} ^ {2} e ^ {- \ beta {\ varvec {H}}} \ right) - \ left [{\ frac {1} {Z}} \ operatorname {Tr} \ left ({\ varvec {H}} e ^ {- \ beta {\ varvec {H}}} \ right) \ right] ^ {2} \\ & = {\ frac {1} {Z}} {\ frac {\ partial ^ {2}} {\ partial \ beta ^ {2}}} Z - {\ frac {1} {Z ^ {2}}} \ left ({\ frac {\ partial} {\ partial \ beta}} Z \ right) ^ {2} = {\ frac {\ partial} {\ partial \ beta}} \ left ({\ frac {1} {Z}} {\ frac {\ partial} {\ partial \ beta}} Z \ right) = {\ frac {\ partial ^ {2} \ ln Z} {\ partial \ beta ^ {2}}} \ end {aligned}}}

The first derivation from to can be identified with the expected energy value: ${\ displaystyle \ ln Z}$${\ displaystyle - \ beta}$

${\ displaystyle \ left (\ Delta E \ right) ^ {2} = - {\ frac {\ partial E} {\ partial \ beta}} = k _ {\ mathrm {B}} T ^ {2} {\ frac {\ partial E} {\ partial T}} = k _ {\ mathrm {B}} T ^ {2} C_ {V}}$

In the last step, the heat capacity was introduced. It is a susceptibility that indicates how an extensive variable (energy) changes with an increase in an intensive variable (temperature). The response of the energy to a temperature increase is correlated with the spontaneous fluctuations of the energy (see fluctuation-dissipation theorem ). ${\ displaystyle C_ {V} = {\ tfrac {\ partial E} {\ partial T}} | _ {V, N}}$

The heat capacity is always positive because the standard deviation is non-negative: . ${\ displaystyle \ left (\ Delta E \ right) ^ {2}> 0}$

In addition, the energy fluctuation can be related to the second derivative of the free energy according to temperature: ${\ displaystyle \ ln Z = - \ beta F}$

${\ displaystyle \ left (\ Delta E \ right) ^ {2} = {\ frac {\ partial ^ {2} \ ln Z} {\ partial \ beta ^ {2}}} = - {\ frac {\ partial ^ {2} (\ beta F)} {\ partial \ beta ^ {2}}} = - k _ {\ mathrm {B}} T ^ {3} {\ frac {\ partial ^ {2} F} {\ partial T ^ {2}}} \ quad \ implies \ quad C_ {V} = - T {\ frac {\ partial ^ {2} F} {\ partial T ^ {2}}}}$

### Equivalence of the ensembles in the thermodynamic Limes

The heat capacity and thus the square of fluctuation is an extensive quantity, i.e. of the order . The expected energy value is also in order . The quotient of the fluctuation range and the mean value is of the order : ${\ displaystyle N}$${\ displaystyle N}$${\ displaystyle N ^ {- 1/2}}$

${\ displaystyle {\ frac {\ Delta E_ {k}} {E_ {k}}} \ sim {\ mathcal {O}} \! \ left ({\ frac {\ sqrt {N}} {N}} \ right) = {\ mathcal {O}} \! \ left ({\ frac {1} {\ sqrt {N}}} \ right)}$

For thermodynamic systems with particles, the quotient is very small (of the order ) and thus the energy distribution is very sharply concentrated around the mean value (see law of large numbers ). In the limiting case of large numbers of particles, the mean energy value and the energy value with the highest probability are identical. ${\ displaystyle N \ sim 10 ^ {22}}$${\ displaystyle 10 ^ {- 11}}$${\ displaystyle E_ {k}}$${\ displaystyle E_ {k}}$${\ displaystyle E ^ {*}}$

The probability density of the energy (not of a certain state for a given energy) is given by , where is the microcanonical sum of states. While the Boltzmann factor decreases monotonically with the energy, the microcanonical density of states increases monotonically with the energy (e.g. for the classical ideal gas), so that the product has a maximum. The energy value with the greatest probability is given by ${\ displaystyle Z ^ {- 1} \, \ Omega (E) \, e ^ {- \ beta E}}$${\ displaystyle \ Omega (E)}$${\ displaystyle e ^ {- \ beta E}}$${\ displaystyle \ Omega (E)}$${\ displaystyle E}$${\ displaystyle \ Omega (E) \ propto E ^ {(3N / 2-1)}}$${\ displaystyle E ^ {*}}$

${\ displaystyle 0 = \ left. {\ frac {\ partial} {\ partial E}} \ left \ {\ Omega (E) \, e ^ {- \ beta E} \ right \} \ right | _ {E = E ^ {*}} = \ left. {\ Frac {\ partial \ Omega (E)} {\ partial E}} \ right | _ {E = E ^ {*}} e ^ {- \ beta E ^ {*}} - \ beta \ Omega (E ^ {*}) e ^ {- \ beta E ^ {*}}}$

It follows:

${\ displaystyle \ beta = {\ frac {1} {\ Omega (E)}} \ left. {\ frac {\ partial \ Omega (E)} {\ partial E}} \ right | _ {E = E ^ {*}} = \ left. {\ frac {\ partial \ ln \ Omega (E)} {\ partial E}} \ right | _ {E = E ^ {*}} = \ left. {\ frac {\ partial \ ln \ Omega (E)} {\ partial E}} \ right | _ {E = U}}$

In the last step, the microcanonical definition of the inverse temperature was identified as the partial derivation of the microcanonical entropy according to the internal energy . Thus applies ${\ displaystyle 1 / T = k _ {\ mathrm {B}} \ beta}$${\ displaystyle S_ {m} = k _ {\ mathrm {B}} \ ln \ Omega (U)}$${\ displaystyle U}$

${\ displaystyle E ^ {*} = U}$

so the most likely value of the energy corresponds to the energy value of the micro-canonical ensemble.

If one develops the logarithmized probability density of the energy in a power series , one obtains: ${\ displaystyle E ^ {*}}$

{\ displaystyle {\ begin {aligned} \ Omega (E) \, e ^ {- \ beta E} & = e ^ {S_ {m} / k _ {\ mathrm {B}} - \ beta E} = e ^ {- \ beta (E-TS_ {m})} = \ exp \! \ left \ {- \ beta (E ^ {*} - TS_ {m} ^ {*}) - \ beta {\ frac {(EE ^ {*}) ^ {2}} {2TC_ {V}}} + {\ mathcal {O}} \! \ Left ((EE ^ {*}) ^ {3} \ right) \ right \} \\ & \ approx \ Omega (E ^ {*}) \, e ^ {- \ beta E ^ {*}} e ^ {- (EE ^ {*}) ^ {2} / (2k _ {\ mathrm {B} } T ^ {2} C_ {V})} \ end {aligned}}}

This is a Gaussian distribution with width . The relative latitude is of the order and approaches zero, i.e. H. the distribution becomes a delta function. In the limit of large numbers of particles, the microcanonical and canonical ensemble become identical, whereby the following applies, i.e. the micronanonical internal energy is equal to the canonical energy expectation value (e.g. and for the classical ideal gas). Both ensembles then cover practically the same areas in phase space (or states in Hilbert space). ${\ displaystyle {\ sqrt {k _ {\ mathrm {B}} T ^ {2} C_ {V}}}}$${\ displaystyle {\ sqrt {k _ {\ mathrm {B}} T ^ {2} C_ {V}}} / E ^ {*}}$${\ displaystyle N ^ {- 1/2}}$${\ displaystyle N \ to \ infty}$${\ displaystyle E ^ {*} = U = E_ {k}}$${\ displaystyle U}$${\ displaystyle E_ {k}}$${\ displaystyle E ^ {*} = (3N / 2-1) \ beta ^ {- 1}}$${\ displaystyle E_ {k} = (3N / 2) \ beta ^ {- 1}}$

The approximate probability density is now used to calculate the canonical partition function:

${\ displaystyle Z = e ^ {- \ beta F} = \ int _ {0} ^ {\ infty} \ mathrm {d} E \, \ Omega (E) \, e ^ {- \ beta E} \ approx e ^ {- \ beta (E ^ {*} - TS_ {m} ^ {*})} \ int _ {- \ infty} ^ {\ infty} \ mathrm {d} E \, e ^ {- (EE ^ {*}) ^ {2} / 2k _ {\ mathrm {B}} T ^ {2} C_ {V}} = e ^ {- \ beta (E ^ {*} - TS_ {m} ^ {*} )} {\ sqrt {2 \ pi k _ {\ mathrm {B}} T ^ {2} C_ {V}}}}$

From this the free energy can be determined:

${\ displaystyle F = (E ^ {*} - TS_ {m} ^ {*}) - {\ frac {k _ {\ mathrm {B}} T} {2}} \ ln (2 \ pi k _ {\ mathrm {B}} T ^ {2} C_ {V}) \ approx E ^ {*} - TS_ {m} ^ {*}}$

The last term can be neglected in the thermodynamic limes, since this is while the others are. Thus, the free energy belonging to the canonical ensemble was reduced to the sizes of the microcanonical ensemble and . ${\ displaystyle {\ mathcal {O}} (\ ln N)}$${\ displaystyle {\ mathcal {O}} (N)}$${\ displaystyle E ^ {*}}$${\ displaystyle S_ {m} ^ {*}}$

### Fluctuation of entropy, pressure and chemical potential

The fluctuation range of the entropy can be traced back to the fluctuation range of the energy and thus related to the heat capacity:

{\ displaystyle {\ begin {aligned} (\ Delta S_ {k}) ^ {2} & = \ langle (-k _ {\ mathrm {B}} \ ln {\ boldsymbol {\ rho}}) ^ {2} \ rangle -k _ {\ mathrm {B}} ^ {2} \ langle -k _ {\ mathrm {B}} \ ln {\ varvec {\ rho}} \ rangle ^ {2} = k _ {\ mathrm {B} } ^ {2} \ langle [\ ln (Z) + \ beta {\ boldsymbol {H}}] ^ {2} \ rangle -k _ {\ mathrm {B}} ^ {2} \ langle \ ln (Z) + \ beta {\ varvec {H}} \ rangle ^ {2} \\ & = k _ {\ mathrm {B}} ^ {2} \ beta ^ {2} \ left [\ langle {\ varvec {H}} ^ {2} \ rangle - \ langle {\ boldsymbol {H}} \ rangle ^ {2} \ right] = {\ frac {1} {T ^ {2}}} (\ Delta E_ {k}) ^ { 2} = k _ {\ mathrm {B}} C_ {V} \ end {aligned}}}

For the squared fluctuation range of the pressure results:

{\ displaystyle {\ begin {aligned} (\ Delta p_ {k}) ^ {2} & = \ left \ langle \ left (- {\ frac {\ partial {\ boldsymbol {H}}} {\ partial V} } \ right) ^ {2} \ right \ rangle - \ left \ langle - {\ frac {\ partial {\ boldsymbol {H}}} {\ partial V}} \ right \ rangle ^ {2} = {\ frac {1} {\ beta ^ {2}}} {\ frac {\ partial ^ {2} \ ln Z} {\ partial V ^ {2}}} + {\ frac {1} {\ beta}} \ left \ langle {\ frac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial V ^ {2}}} \ right \ rangle \\ & = - {\ frac {1} {\ beta}} {\ frac {\ partial ^ {2} F} {\ partial V ^ {2}}} + {\ frac {1} {\ beta}} \ left \ langle {\ frac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial V ^ {2}}} \ right \ rangle = {\ frac {1} {\ beta}} {\ frac {\ partial p_ {k}} {\ partial V}} + {\ frac {1} {\ beta}} \ left \ langle {\ frac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial V ^ {2}}} \ right \ rangle = - { \ frac {1} {\ beta}} {\ frac {1} {V \ kappa _ {T}}} + {\ frac {1} {\ beta}} \ left \ langle {\ frac {\ partial ^ { 2} {\ boldsymbol {H}}} {\ partial V ^ {2}}} \ right \ rangle \ end {aligned}}}

and for the chemical potential:

{\ displaystyle {\ begin {aligned} (\ Delta \ mu _ {k}) ^ {2} & = \ left \ langle \ left ({\ frac {\ partial {\ boldsymbol {H}}} {\ partial N }} \ right) ^ {2} \ right \ rangle - \ left \ langle {\ frac {\ partial {\ boldsymbol {H}}} {\ partial N}} \ right \ rangle ^ {2} = {\ frac {1} {\ beta ^ {2}}} {\ frac {\ partial ^ {2} \ ln Z} {\ partial N ^ {2}}} + {\ frac {1} {\ beta}} \ left \ langle {\ frac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial N ^ {2}}} \ right \ rangle \\ & = - {\ frac {1} {\ beta}} {\ frac {\ partial ^ {2} F} {\ partial N ^ {2}}} + {\ frac {1} {\ beta}} \ left \ langle {\ frac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial N ^ {2}}} \ right \ rangle = - {\ frac {1} {\ beta}} {\ frac {\ partial \ mu _ {k}} {\ partial N }} + {\ frac {1} {\ beta}} \ left \ langle {\ frac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial N ^ {2}}} \ right \ rangle = - {\ frac {1} {\ beta}} {\ frac {V} {N ^ {2} \ kappa _ {T}}} + {\ frac {1} {\ beta}} \ left \ langle { \ frac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial N ^ {2}}} \ right \ rangle \ end {aligned}}}

From the positivity of the variance and the isothermal compressibility it follows: and${\ displaystyle \ langle {\ tfrac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial V ^ {2}}} \ rangle> - {\ tfrac {\ partial p_ {k}} {\ partial V}} = {\ tfrac {1} {V \ kappa _ {T}}}> 0}$${\ displaystyle \ langle {\ tfrac {\ partial ^ {2} {\ boldsymbol {H}}} {\ partial N ^ {2}}} \ rangle> {\ tfrac {\ partial \ mu _ {k}} { \ partial N}} = {\ tfrac {V} {N ^ {2} \ kappa _ {T}}}> 0}$