# How Can Energy of the Canonical Ensemble Vary?

Canonical ensemble is an statistical ensemble which is applicable for the closed system in contact with the reservoir at constant temperature $$T$$. Canonical ensemble is characterized by the three fixed variables; number of particles $$N$$, volume $$V$$ and temperature $$T$$.

What is said is that microstates of the canonical ensemble may differ in their internal energy as energy can be exchanged with the reservoir until thermal equilibrium is established between reservoir and the system.

However, if we for example had an ideal gas in our system, we know that its state is completely specified by two intensive variables (in context of the canonical ensemble; molar volume and temperature) and number of particles (number of moles). Since all these variables are specified in the canonical ensemble, how can internal energy of the system change?

• Terminology issue: microstates of the canonical ensemble may differ in their internal energy - you speak either of energy of microstates or the internal energy of the system, but microstates do not have internal energy. Also, I would see change of energy as transition to a different microstate, rather than change in a microstate (which is specified values of positions and momenta). Commented Jul 6, 2022 at 11:57
• System energy is not conserved because you fixed its temperature by connecting the system to a reservoir with which it can exchange thermal energy and when it does so its total energy fluctuates. Commented Jul 6, 2022 at 12:55

The macroscopic state in the canonical ensemble is characterized by fixed values of temperature, volume, and number of moles (or particles). This has nothing to do with the fact that the internal energy of a perfect gas depends on temperature only.

Actually, in the canonical ensemble the energy of the system does fluctuate, and for the ideal gas, it is a simple exercise to evaluate such fluctuations. The thermodynamic result is recovered at the thermodynamic limit, where the relative fluctuations vanish.

• I would add that the fluctuations are much smaller than the values of the variables. Commented Jul 6, 2022 at 11:54
• "...canonical ensemble is characterized by fixed values of temperature" - this, in turn, means fixing the average value of the energy, and not the energy itself, which can change Commented Jul 6, 2022 at 12:20
• Yes, however how are such fluctutations possible if state of the system is completely determined by specifying temperature, volume and number of particles? Commented Jul 6, 2022 at 12:33
• In another words, what causes such fluctuations of the energy? Commented Jul 6, 2022 at 12:34
• I started saying that the macroscopic state is completely determined by specifying temperature, volume and number of particles. However, the ensemble is made by all the microscopic states compatible with the macrostate. The statistics on such microstates shows that there are fluctuations around the average values. In other words, fluctuations of energy are unavoidable in a population of microstates at a fixed temperature. Commented Jul 6, 2022 at 15:12