# How can temperature be defined as it is if entropy isn't a function of energy?

I've been taught that for large systems, the temperature of a system is defined as $$\frac{1}{T} \equiv \left(\frac{\partial S}{\partial U}\right)_{N, V}.$$ I have a problem with this definition, namely, that the entropy of a system isn't a function of the energy of the system because the entropy of the system is $$S = k\ln\Omega,$$ where $$\Omega$$ is the multiplicity of the system's current macrostate, and for a given amount of energy, the system may have several macrostates. How (precisely) is this problem resolved?

P.S. I don't remember what my past self is talking about in this question: Definition of temperature ambiguity. He has knowledge or a notion that I don't have.

• So your issue is that $\Omega\neq\Omega(U)$? – Aaron Stevens Apr 4 at 16:57
• @AaronStevens Correct. – PiKindOfGuy Apr 4 at 16:57
• As you yourself wrote, your 2nd equation gives the entropy "for a given amount of energy". – Samuel Weir Apr 4 at 16:58
• @SamuelWeir There is more than one entropy for a given amount of energy. – PiKindOfGuy Apr 4 at 16:59
• I would recommend reading Is the Boltzmann constant really that important?. – DanielSank Apr 4 at 17:29

You are correct in saying that the multiplicity is not a function of just the energy, it depends on other things as well. This is why the definition of temperature includes the additional requirement that the partial derivative involves holding the system at a constant volume and number of particles.

So it is not true in general that $$\Omega=\Omega(U)$$ (i.e. just a function of energy), but it is true that $$\Omega=\Omega(U,V,N)$$ for the definition you give.

I suppose there could be other relevant variables as well, but they would just appear as extra terms in your thermodynamic identity which would then be set to $$0$$ by holding things constant in order to use the above definition.

• How do you know that $\Omega = \Omega\left(U, V, N\right)$? – PiKindOfGuy Apr 4 at 17:50
• @PiKindOfGuy those are all the variable parameters in the system, it cannot depend on anything else – Gabriel Golfetti Apr 5 at 1:23
• @GabrielGolfetti Okay, but how does one know that? – PiKindOfGuy Apr 5 at 11:35
• @PiKindOfGuy Try to think of any other variable that can describe the system that's not inherently characteristic to it. You probably won't find anything else. – Gabriel Golfetti Apr 5 at 11:41
• @GabrielGolfetti GiogioP's answer has examples of other variables that could matter. Your argument is pretty weak. – Aaron Stevens Apr 5 at 12:25

Your question goes directly to the problem of identifying all the variables which uniquely identify a macrostate. With the exception of the usual textbook examples, it could be a non trivial problem.

It is a fingerprint of thermodynamics that the energy of the system is one of the relevant variables. In addition to energy, the other variables may vary from a system to another. For fluid systems confined in a volume $$V$$ and made by $$N$$ particles, these two additional parameters may identify a macrostate. However, both, the choice of the two additional variables (in addition to energy) and the fact that two are enough should be looked as an experimentally verifiable fact.

Indeed, for a solid system, $$V$$ is not enough, as the shape matters to identify the macrostate, in addition to the volume. Thus, the strain tensor would be required. If each molecule carries an electric dipole, a macroscopic polarization vector would be required to select a macrostate.

However, since energy remains one of the variables identifying the macrostate, the condition of equilibrium with respect to the exchange of energy between two arbitrary systems in thermal contact remains the equality of the partial derivatives of the entropy of each system with respect to energy by keeping fixed all remaining variables (whatever they are).

So as we saw earlier the principle of maximum entropy is simply a principle that if we are looking at a sufficiently isolated system then our uncertainties multiply until we are effectively choosing one possibility uniformly at random from some “phase space” of possibilities. The meaning of “uniformly at random” is slightly suspect, as it requires us to specify what coördinates we use to describe phase space, but in general we take every Cartesian position-and-momentum coördinate pair and parcel it up into chunks of some size $$h$$, where once we start doing quantum mechanics we get rigorous about $$h$$ being Planck's constant due to the uncertainty principle, but in classical mechanics it is just some normalization constant.

The “phase space of possibilities” then is constrained by any conservation laws that we have, e.g. conservation of energy, and by other constraints like a fixed volume, or a fixed number of particles. Finally, other observables can identify one macroscopic state as distinct from some other macroscopic state: for example if we are watching two gases of different colors (say red and blue) mixing together into one homogeneous color, we might have some sort of observable “mixing length” (the length of the purple segment between them) which identifies a class of macroscopic states distinct from each other. One often needs to be careful to include some form of experimental uncertainty to get an authentic count of microstates in a macrostate, but one can also take limits as this uncertainty goes to zero. The principle of maximum entropy then dictates a “spontaneous” transition of our observables to a configuration which has the largest phase-space volume.

# The sort of reasoning we are pursuing

Suppose that like our two-gases-of-different-colors mixing example, we have a bigger system that is comprised of two subsystems with variable energies. We then have an internal degree of freedom, $$E_1$$, with the total energy $$E$$ conserved and $$E_2 = E - E_1.$$ This is some observable degree of freedom. Now if these subsystems are otherwise isolated, then we can come up with their subsystem entropies $$S_{1,2}$$ if we were to disable their ability to share energy with each other, and we would find due to the multiplicative nature of multiplicity and the logarithm that the overall entropy is $$S(E, E_1) = S_1(E_1) + S_2(E - E_1).$$Now if we were to change $$E_1$$ we would find a change in the entropy, $$S(E, E_1 + \epsilon) = S_1(E_1) + S_1'(E_1)\epsilon + S_2(E - E_1) - S_2'(E - E_1) \epsilon.$$The total change from an increase of $$E_1$$ is thus given by multiplying that change by $$S_1' - S_2',$$ and this change will be positive and therefore entropically favored if $$S_1' > S_2'.$$ So $$S_{1,2}'$$ measure a sort of coldness, where energy spontaneously flows into a subsystem with larger $$S'$$ from a subsystem with smaller $$S'$$. Moreover thermal equilibrium will then happen when they both have the same $$S'$$ at which point entropy will not favor one or the other at all.

# A subtlety

If you were to now combine two of those systems into a homogeneous whole, would $$\left(\frac{\partial S}{\partial E}\right)_{E_1}$$ be a correct definition of temperature?

It is probably eventually correct, since it is $$S_2'$$, but it is probably not instantaneously correct. In fact a system which is not in thermal equilibrium cannot be assigned just one authoritative temperature value. So for example let us couple the four subsystems linearly with temperatures (in some arbitrary units):

+--------+   +--------+   +--------+   +--------+
|   10   |---|   70   |===|   40   |---|   60   |
+--------+   +--------+   +--------+   +--------+


Here we see four boxes thermally connected in a line, the first subsystem is two boxes with temperatures 10 and 70, the second subsystem is two boxes with temperatures 40 and 60.

The left subsystem has in some sense temperature "40" since that is what it would come to if allowed to come to equilibrium, (10 + 70)/2. The right subsystem has in some sense temperature "50" as that would be (40 + 60)/2. So if we were to define temperature coherently in this fashion, surely energy would flow from hotter to colder, from right to left, correct?

Well, that is eventually correct but it is not immediately correct. Since the 70 is in thermal contact with the 40, heat will first flow from the left to the right. Only after some time will the heat flow back from the right to the left.

So you are correct to suspect some shenanigans. Temperature does not have an additive property where we can easily define the temperature of a whole if its parts have different temperatures.

This can be very easily seen by the equipartition theorem, which states that the world can be decomposed into various “degrees of freedom” and then measures the temperature of any degree of freedom as the average energy in that degree of freedom. If you have a bunch of degrees of freedom, you can only define the temperature if they all have the same average.

So let's suppose you want to analyze a harmonic oscillator that dissipates into a many other degrees of freedom: probably what you want to do is to model this as a system with two non-equilibrium degrees of freedom $$x, p$$, and those two do not have a well-defined temperature, in some sort of contact with a multitude of degrees of freedom which we collectively combine into one thermal “bath” at some well-specified temperature. And this combined system can then show you a dissipation from the energy sloshing back and forth from $$x$$ into $$p$$ and back into the bath, plus it can show you that $$x$$ and $$p$$ come to a nonzero equilibrium energy state where they have the same energy as the bath.

• Your "subtelty' could immediately be removed by observing that both the thermodynamic reasoning and that from statistical mechanics assume from the start to deal with systems at equilibrium. – GiorgioP Apr 5 at 11:09