# How can energy vary in the canonical ensemble

## Main Question or Discussion Point

I must be missing some point with regards to the canonical Distribution. Let us imagine I have a closed (to energy and matter) box full of ideal gas at temperature T. The total energy in the box equals hence
E=3N2kT
, where N is the number of molecules, k Boltzmann's connstant.

Next, I allow the box to Exchange energy with a heat bath at, say, the same temperature T. Now the probability of having an energy E in the box follows Boltzmann's distributon, ∼exp−E/kT .

But if the energy in the gas contained in the box varies, also ist tempetrature will! The latter though should not, as coupling to the bath should yield isothermal conditions.

How can the energy vary if the temperature is constant??

What am I missing here?

Thanks

Related Classical Physics News on Phys.org
by constant temperature one means that average temperature may be constant but its maintained by an envelope of a infinite heat bath around a canonicall ensemble and one can expect fluctuations in energy -the parts can said to be exchanging heat energy with its surrounding- the Boltzmann distribution holds and energy density can be defined

Let us imagine I have a closed (to energy and matter) box full of ideal gas at temperature T. The total energy in the box equals hence
E=3N2kT
, where N is the number of molecules, k Boltzmann's constant.
i think your expression for energy is not correct (you are using equipartion of energy) one should go for statistical calculations and define free energy of the canonical distribution as total Hamiltonian is conserved which includes the Hamiltonian of the bath also.
i think you should consult a text book or reading material on canonical ensemble
i can suggest you a material for concept clarification
Ref. <http://micro.stanford.edu/~caiwei/me334/Chap8_Canonical_Ensemble_v04.pdf> [Broken] if it is allowed by the admin.

Last edited by a moderator:
I am not so sure I understand it though.
While I understand what a mean energy can be, I am not familiar at all with "mean temperature" in the canonical Setting. the temperature as I understand it should be fixed by the bath.

Why is the Expression I quote for energy wrong? Equipartition of energy does not hold? And if wrong, is there a one-to-one relationship between eneegy of an ideal gas and temperature?
I did of course check statistical mechanics textbooks. For my Subsystem coupled with the heat bath the free energy is constant. The energy Need not, and is distributed according to a Bolzmann Distribution. This is ok, the free energy still remains constant by Variation in entropy. But what puzzles me is the temperature of the Subsystem: is there is a one-to-one relationship between temperature and energy, how can the Subsystem be at constant temperature is ist energy can vary?
Thanks

Why is the Expression I quote for energy wrong?
you have written 3N2kT which i pointed not to be not correct-pl. check it

But what puzzles me is the temperature of the Subsystem: is there is a one-to-one relationship between temperature and energy, how can the Subsystem be at constant temperature is ist energy can vary?
In statistical mechanics, if the system have a well defined temperature, its total energy E must fluctuate.
The temperature can be maintained constant as the system is in contact with heat reservoir- however the energy which can be expected value of hamiltonian and it can have a finite variance - as the the system is not isolated and its total energy is not conserved - this is different from usual thermodynamics.

The equation was wrong indeed, the correct one is $E = 3NkT/2$.
You say "
In statistical mechanics, if the system have a well defined temperature, its total energy E must fluctuate", this is not true, if I understand anything: in the microcanonical Setting the temperature and the energy are constant.
Regardless, let me re-phrase my Problem. The follwoing three Statements. all of which I believe true, are contradictory:
1) a box of ideal gas in equilibrium and contact with a heat bath at temperature T is itself at the same temperature T
2) Given a box of ideal gas, fixed volume and number of Atoms, there is a one to one relationship between energy and temperature
3) The gas in the box has an energy distributed according to the Boltzmann' s Distribution,

One must be wrong. I underdstand gthe box is not isolated and can Exchange energy with the heat bath, so that ist energy can vary. I cannot egt how the energy can vary, but at the same time the temperature be fixed.

Thanks

DrClaude
Mentor
The follwoing three Statements. all of which I believe true, are contradictory:
1) a box of ideal gas in equilibrium and contact with a heat bath at temperature T is itself at the same temperature T
2) Given a box of ideal gas, fixed volume and number of Atoms, there is a one to one relationship between energy and temperature
3) The gas in the box has an energy distributed according to the Boltzmann' s Distribution,
Number 2 is not correct. There is a relation between the average energy and temperature, but in the canonical ensemble, temperature is fixed while energy will fluctuate. For a big enough system (thermodynamic limit), the fluctuations are too small to measure, but they are still there.

I also have a problem with 3. I'm not sure what you mean by "energy distributed according to the Boltzmann' s Distribution."

Thank you for your help. So number 2 is the one I misunderstood.
3) is probably bad language from my side. Maye something like, "the probability of the ideal gas to be in a certain microstate with a certain energy E, follows Boltzmann's distribution".

I am afraid I still have issues on the matter.
Now I understand that average energy and temperature are related.
So in my canonical System the temperature, and hence the average energy, are constant.
By Definition, the free energy is constant.
The latter equals A = {E} - TS, where {} is used to denote average values.
So if temperature is constant and temperature is as well, the entropy S must be constant. But this cannnot be: the derivative of the entropy with respect to the energy equals the inverse of the temperature. The inverse of the temperature is constant, so entropy must vary as energy varies during the energy fluctuations.

Thanks

So if temperature is constant and temperature is as well, the entropy S must be constant. But this cannnot be: the derivative of the entropy with respect to the energy equals the inverse of the temperature. The inverse of the temperature is constant, so entropy must vary as energy varies during the energy fluctuations.
well i do not have the book but used the above ref. in my comment expressions are like

A(T, V, N) = −k(B). T. lnZ

Notice that energy E is the ensemble average of the Hamiltonian. But the free energy A cannot be written as an ensemble average. A is proportional to the log of the normalization constant ;
A is proportional to lnZ. (Analogous to Boltzmann’s entropy expression for the canonical ensemble S = k(B) ln Ω.)
z is also called partition function
so some expressions will look like normal thermodynamics but the canonical distribution will take care of the canonical momenta and energy of individual particles in a N-particle system in deriving the physical parameters .if some particles have definite energy states available then calculations become simpler!

Thanks for your reply. Maybe (probably) I am a little slow, but I dare say I do not see how your comment answers my question.
I know that
A(T, V, N) = −k(B). T. lnZ
and in all textbooks it is shown how this expression coincides with the "classical" one, A = {E} - TS.

My question is, by looking at the classical expression, as both A, T and {E} (not E, as I wronlgly thought, which is fluctuating) are fixed in the canonical setting, S must be too.

But 1/T = dS/dE, so as T is constant, S and E must vary linearly. So as E varies, due to fluctuations, S must be too. But this contradicts the fact A must be constant.

Hope this clarifies.

Thanks a lot.

DrClaude
Mentor
and in all textbooks it is shown how this expression coincides with the "classical" one, A = {E} - TS.
No, there is no average value there. It is A = E - TS, with E the (instantaneous) energy of the system, which fluctuates.

Thanks a lot. This discussion was very useful to me.