Entropy maximization under thermal contact Created 2026-09-29 Updated 2026-10-18
At fixed volumes and material inventories, two internally equilibrated bodies that exchange only heat within an isolated system have fixed total internal energy . Their total entropy is
Using , an interior stationary point obeys
Thus entropy stationarity requires matching thermodynamic temperatures. Positive values of heat capacity at constant volume make this a strict local maximum because
For bodies with positive heat capacities throughout the accessible range, this concavity gives at most one interior maximum. This is the stability check behind the equal-temperature condition; see entropy concavity and positive heat capacity. [ref]
For thermal equilibration of two finite bodies, entropy from heat capacity gives
Body 1 gains about of entropy, while body 2 loses about . Total energy is conserved even though total entropy increases. The entropy calculation uses reversible comparison paths between the endpoint states; actual exchange across a finite temperature difference is irreversible.
Figure 1.
At fixed total energy, matching temperatures maximize total entropy
. The curve is total entropy relative to the initial , state. Every point satisfies . Only is shown; the mathematical model's positive-temperature domain is . Details.
To construct the plot, vary while enforcing the energy constraint, rather than holding fixed. In numerical units of kelvin, , and the plotted function is
Here means , so its zero is a reference choice. The chain rule yields
The unique maximum is at . The physical trajectory starts at and moves toward that maximum; the rest of the curve compares other possible energy partitions, not later times in the trajectory.
The contact model also proves the direction of change directly:
For and positive temperatures, equality holds exactly at thermal equilibrium. The appealing link is that a dynamical heat transfer law moves the system uphill on the constrained entropy curve, while conservation of energy keeps it on that curve. This predicts both why the endpoint is stable and why the reverse separation into hot and cold bodies cannot happen spontaneously in the isolated system.
Let two systems exchange energy inside an otherwise isolated composite system, so is fixed. By the Second law of thermodynamics, equilibrium maximizes the total entropy
At an interior maximum,
Thus , which is entropy maximization under thermal contact and the condition for thermal equilibrium.
Stability requires this entropy maximum to be locally strict, so each ordinary subsystem has a concave entropy-energy relation. Since
one has , or equivalently
This is the entropy concavity and positive heat capacity criterion.
Now let and . Because the spins are distinguishable, the number of microstates is the binomial coefficient
The Boltzmann entropy and the Stirling formula give, to leading order for large ,
The total energy is
Therefore
Solving for the up-spin fraction gives the independent spin-one-half two-level system result
For ordinary positive absolute temperature,
with as and as . Since the spectrum is bounded above, the population-inverted range is also mathematically possible and corresponds to negative temperature; is the infinite-temperature state.
Substitution gives
and direct differentiation yields
Thus the energy increases with temperature throughout either finite-temperature branch, in particular throughout the required positive-temperature range.