Reference: Daniel V. Schroeder, An Introduction to Thermal Physics, (Addison-Wesley, 2000) – Problems 3.3 – 3.4.
The definition of temperature in terms of entropy is
Systems in thermal equilibrium have equal slopes in their entropy-versus-energy graphs and therefore have the same temperature.
We can use this fact to determine, from the entropy-versus-energy plots, the behaviour of two systems when placed in thermal contact, so they can exchange energy but nothing else. Suppose we have two systems with entropy plots as shown:
Suppose we start both systems off at energies , so that the slope is larger for than . The systems will evolve by exchanging energy until these two slopes are equal. To figure out which way energy is exchanged, we need to impose the constraint that . Thus if we increase we must decrease by the same amount, and vice versa. To make the slopes equal, we could therefore increase the slope for and decrease the slope for , which we can do by decreasing and increasing by the same amount. [Note that the slopes of both plots decrease as we increase the energy.] That is, system will transmit some of its energy to system until the slopes become equal. [Although Schroeder says we’re not supposed to use the word “temperature” in the explanation, clearly what we’re doing is decreasing the temperature of and increasing that of until the temperatures are equal. The slope is just another way of referring to the temperature.]
The two systems above are ‘normal’ in the sense that adding energy to them increases their temperature, since decreases as increases. For some systems, such as those bound by gravity, however, the temperature actually decreases as we add energy, since the energy gets stored as potential energy and the average kinetic energy is reduced. In other words, the heat capacity is negative. In that case, the entropy plot would look something like this:
Suppose we also start this system off at a value of which gives it the same slope as system at (a value around looks about right). This places systems and in thermal equilibrium, but is it stable? Again, we’re subject to the constraint . If we increase by a bit and decrease by the same amount, the slopes of both curves decrease, meaning both systems get hotter, and if we transfer energy in the opposite direction, the slopes both increase, meaning both systems decrease in temperature. Whether or not this results in instability depends on the relative changes in temperature. Suppose we make both systems hotter, but that gets hotter than . Then energy should flow spontaneously back from to and in this case, the equilibrium should be stable. However, if gets hotter than , then energy will continue to flow from to and the equilibrium is unstable.
If both systems have negative heat capacity, then if we start with both systems at the same temperature and transfer a bit of energy from one to the other, the system that loses energy gets hotter and the system that gains energy gets colder, so energy will continue to be transferred in the same direction, resulting in the equilibrium being unstable.
In the unstable cases, there is a limit to amount of energy transferred, of course, since there is only a finite amount of energy in the system and once one of the systems has absorbed it all, the transfer stops. The final state might be considered a stable equilibrium of sorts, although it’s not a thermal equilibrium since the two systems are at different temperatures.