# The canonical and the microcanonical ensemble

We could now ask how the microcanonical and the canonical ensembles are related. Since in the canonical ensemble we have removed the constraint of having constant energy, the energy of a system will in general fluctuate around its mean value. We can therefore ask if these fluctuations are relevant or not. In fact if it turns out that they are negligible (at least in the thermodynamic limit) then we can conclude that the canonical and microcanonical ensembles are equivalent.

Let us therefore compute $\left\langle {\mathcal {H}}\right\rangle$ and ${\textstyle \sigma _{E}^{2}=\left\langle \left({\mathcal {H}}-\left\langle {\mathcal {H}}\right\rangle \right)^{2}\right\rangle }$ . First of all, from the definition of the canonical partition function we have:

$\left\langle {\mathcal {H}}\right\rangle ={\frac {1}{Z}}\int e^{-\beta {\mathcal {H}}}{\mathcal {H}}d\Gamma =-{\frac {1}{Z}}{\frac {\partial Z}{\partial \beta }}=-{\frac {\partial \ln Z}{\partial \beta }}$ and:
{\begin{aligned}\sigma _{E}^{2}=\left\langle {\mathcal {H}}\right\rangle -\left\langle {\mathcal {H}}\right\rangle ^{2}={\frac {1}{Z}}{\frac {\partial ^{2}Z}{\partial \beta ^{2}}}-\left(-{\frac {\partial \ln Z}{\partial \beta }}\right)^{2}={\frac {\partial ^{2}\ln Z}{\partial \beta ^{2}}}=-{\frac {\partial \left\langle {\mathcal {H}}\right\rangle }{\partial \beta }}=\\=-{\frac {\partial T}{\partial \beta }}{\frac {\partial \left\langle {\mathcal {H}}\right\rangle }{\partial T}}=k_{B}T^{2}C_{V}\end{aligned}} $\Rightarrow \quad \sigma _{E}^{2}=k_{B}T^{2}C_{V}$ This is a fluctuation-dissipation relation, which we couldn't find using only thermodynamics. Therefore, the relative fluctuation of energy is:
${\frac {\sigma _{E}}{\left\langle {\mathcal {H}}\right\rangle }}={\frac {\sqrt {k_{B}T^{2}C_{V}}}{\left\langle {\mathcal {H}}\right\rangle }}$ Both $\left\langle {\mathcal {H}}\right\rangle$ and $C_{V}$ are extensive quantities, i.e. proportional to $N$ , and therefore:
${\frac {\sigma _{E}}{\left\langle {\mathcal {H}}\right\rangle }}\propto {\frac {1}{\sqrt {N}}}$ Thus, if our system is macroscopic the relative fluctuations of energy are absolutely negligible (as we have already seen, for $N\sim 10^{23}$ this relative fluctuation is of the order of $10^{-11}$ )! We can therefore conclude that the canonical and microcanonical ensembles are indeed equivalent.