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.