physics2u
Tier
⌕ Search ⌘K
Derivation

Temperature, Pressure and Chemical Potential from Entropy Maximization

D-232 Home PU-302 Threads energy · chance Depends on Boltzmann Entropy from Microstate Counting
Statement

For an isolated composite of two subsystems free to exchange energy, volume and particles across a movable, permeable wall, maximizing the total entropy \( S = S_A + S_B \) at fixed total energy, volume and particle number forces the intensive quantities \( \left(\dfrac{\partial S}{\partial E}\right)_{V,N} \), \( \left(\dfrac{\partial S}{\partial V}\right)_{E,N} \) and \( \left(\dfrac{\partial S}{\partial N}\right)_{E,V} \) to be equal across the wall. Identifying these common equilibrium values with temperature, pressure and chemical potential defines \( \dfrac{1}{T} \equiv \left(\dfrac{\partial S}{\partial E}\right)_{V,N} \), \( \dfrac{p}{T} \equiv \left(\dfrac{\partial S}{\partial V}\right)_{E,N} \) and \( \dfrac{\mu}{T} \equiv -\left(\dfrac{\partial S}{\partial N}\right)_{E,V} \).

Why it matters

These three partial derivatives are the bridge between statistical mechanics and classical thermodynamics. Once entropy is known as a function of the extensive variables \( (E,V,N) \) — the fundamental relation \( S(E,V,N) \) — every equation of state, every heat capacity and every phase boundary follows by differentiation. Temperature, pressure and chemical potential are not imposed from outside; they are read off the entropy surface.

The derivation also explains why heat flows from hot to cold, why volume shifts toward lower pressure, and why particles migrate down a chemical-potential gradient: all three are the single statement that an isolated system moves to the macrostate of overwhelmingly greatest multiplicity. Equilibrium is where that drive stops.

Assumptions
The composite is isolated.If energy, volume or particles leak to a third reservoir, the conserved-total constraints \( E_A+E_B=\text{const} \), etc., break, and the equal-slope conditions no longer characterize the state.
Entropy is extensive and additive: \( S = S_A + S_B \).If the wall or interface carries appreciable surface entropy, or if long-range interactions correlate the subsystems, additivity fails and cross terms enter the maximization.
\( S(E,V,N) \) is smooth and the maximum is interior.If \( S \) is non-differentiable (a first-order phase transition, a boundary of the accessible region) the stationarity condition \( dS=0 \) is replaced by inequalities and coexistence rules.
\( S \) is concave in its extensive variables (thermodynamic stability).If the second differential is not negative-definite, the stationary point is a saddle or minimum; the "equilibrium" is unstable and the system phase-separates rather than sitting at the common slope.
Subsystems are large enough that fluctuations are negligible.For small \( N \) the entropy maximum is broad and the sharp intensive variables \( T,p,\mu \) become ill-defined ensemble averages rather than definite numbers.
Derivation
1
\[ E_A + E_B = E, \qquad V_A + V_B = V, \qquad N_A + N_B = N \]
Isolation fixes the totals; only exchanges between \(A\) and \(B\) are allowed. A
2
\[ S_{\text{tot}}(E_A,V_A,N_A) = S_A(E_A,V_A,N_A) + S_B(E-E_A,\,V-V_A,\,N-N_A) \]
Additivity of entropy, with \(B\)'s variables eliminated using the constraints. The three free variables are \((E_A,V_A,N_A)\). A
3
\[ dS_{\text{tot}} = \left(\frac{\partial S_A}{\partial E_A}\right)dE_A + \left(\frac{\partial S_A}{\partial V_A}\right)dV_A + \left(\frac{\partial S_A}{\partial N_A}\right)dN_A + \left(\frac{\partial S_B}{\partial E_B}\right)dE_B + \left(\frac{\partial S_B}{\partial V_B}\right)dV_B + \left(\frac{\partial S_B}{\partial N_B}\right)dN_B \]
Total differential of \(S_{\text{tot}}\); each partial is taken holding the other two extensive variables of that subsystem fixed. A
4
\[ dE_B = -\,dE_A, \qquad dV_B = -\,dV_A, \qquad dN_B = -\,dN_A \]
Differentiating the conservation laws of Step 1: what one subsystem gains, the other loses. A
5
\[ dS_{\text{tot}} = \left(\frac{\partial S_A}{\partial E_A}-\frac{\partial S_B}{\partial E_B}\right)dE_A + \left(\frac{\partial S_A}{\partial V_A}-\frac{\partial S_B}{\partial V_B}\right)dV_A + \left(\frac{\partial S_A}{\partial N_A}-\frac{\partial S_B}{\partial N_B}\right)dN_A \]
Substitute Step 4 into Step 3 and collect the independent differentials \(dE_A,\,dV_A,\,dN_A\). B
6
\[ dS_{\text{tot}} = 0 \quad\text{for arbitrary } dE_A,\,dV_A,\,dN_A \]
At the entropy maximum the first variation vanishes for every allowed displacement; the three exchanges are independent, so each bracket must vanish separately. C
7
\[ \frac{\partial S_A}{\partial E_A} = \frac{\partial S_B}{\partial E_B}, \qquad \frac{\partial S_A}{\partial V_A} = \frac{\partial S_B}{\partial V_B}, \qquad \frac{\partial S_A}{\partial N_A} = \frac{\partial S_B}{\partial N_B} \]
Setting each coefficient bracket in Step 5 to zero. These are the equilibrium conditions: the energy-, volume- and particle-slopes of the entropy match across the wall. B
8
\[ \frac{1}{T} \equiv \left(\frac{\partial S}{\partial E}\right)_{V,N} \]
Definition. The common value of the energy-slope is one intensive number shared by both subsystems in thermal equilibrium; call its reciprocal the temperature. Consistency with \(dU=T\,dS\) fixes the reciprocal, not the direct, identification. A
9
\[ \frac{p}{T} \equiv \left(\frac{\partial S}{\partial V}\right)_{E,N}, \qquad \frac{\mu}{T} \equiv -\left(\frac{\partial S}{\partial N}\right)_{E,V} \]
Definitions of pressure and chemical potential, chosen so that the combined law \( dS = \frac{1}{T}dE + \frac{p}{T}dV - \frac{\mu}{T}dN \) reproduces \( dE = T\,dS - p\,dV + \mu\,dN \). The minus sign makes particles flow toward lower \(\mu\). B
10
\[ T_A = T_B, \qquad p_A = p_B, \qquad \mu_A = \mu_B \]
Re-expressing Step 7 with the definitions of Steps 8–9: thermal, mechanical and diffusive equilibrium are equality of \(T\), of \(p\), and of \(\mu\) respectively. A
Result
\[ \frac{1}{T} = \left(\frac{\partial S}{\partial E}\right)_{V,N}, \qquad \frac{p}{T} = \left(\frac{\partial S}{\partial V}\right)_{E,N}, \qquad \frac{\mu}{T} = -\left(\frac{\partial S}{\partial N}\right)_{E,V} \]

Reading. The entropy surface \( S(E,V,N) \) encodes all three intensive variables as its slopes. A steeper rise of entropy with energy means a colder body (larger \(1/T\)): adding a little energy buys a lot of extra multiplicity. Two bodies in contact equilibrate to a common slope in each direction, which is exactly \(T_A=T_B\), \(p_A=p_B\), \(\mu_A=\mu_B\). Off equilibrium, the second law \( dS_{\text{tot}}\ge 0 \) makes energy flow from high \(T\) to low \(T\), volume grow where \(p\) is higher, and particles move from high \(\mu\) to low \(\mu\).

Units check. \([S]=\mathrm{J\,K^{-1}}\), \([E]=\mathrm{J}\), so \([\partial S/\partial E]=\mathrm{K^{-1}}=[1/T]\). \([\partial S/\partial V]=\mathrm{J\,K^{-1}\,m^{-3}}=(\mathrm{Pa})/(\mathrm{K})=[p/T]\) since \(\mathrm{Pa}=\mathrm{J\,m^{-3}}\). \([\partial S/\partial N]=\mathrm{J\,K^{-1}}\) per particle \(=[\mu/T]\) with \([\mu]=\mathrm{J}\). All three definitions are dimensionally consistent.

Limiting cases
  • Only energy exchange (rigid, impermeable wall): \(dV_A=dN_A=0\), so only \( \partial S_A/\partial E_A=\partial S_B/\partial E_B \) survives, i.e. \(T_A=T_B\) alone — the classic thermal-contact result.
  • Movable but impermeable wall (diathermal piston): \(T_A=T_B\) and \(p_A=p_B\); particle numbers stay fixed.
  • Fixed volume, permeable membrane: \(T_A=T_B\) and \(\mu_A=\mu_B\) — the setting of osmosis and semipermeable equilibria.
  • Ideal gas, \( S = Nk_B\ln(E^{3/2}V/N^{5/2}) + \text{const} \): \( \partial S/\partial E = \tfrac{3}{2}Nk_B/E \) gives \( E=\tfrac{3}{2}Nk_BT \), and \( \partial S/\partial V = Nk_B/V \) gives \( pV=Nk_BT \). The definitions reproduce the equation of state.
  • \( T\to 0 \): \( \partial S/\partial E\to\infty \); the entropy slope diverges and (by the third law) \(S\) flattens, so the intensive variables become singular near absolute zero.
Breaks when
  • Non-additive / long-range interactions. For self-gravitating systems or unscreened Coulomb matter, \( S_{\text{tot}}\neq S_A+S_B \); the entropy can be non-concave and the "equal-slope" equilibrium is unstable — gravitating systems have negative heat capacity and heat flows the "wrong" way.
  • First-order phase transition / phase coexistence. At a latent-heat plateau \( S(E) \) has a straight segment or a kink, so \( \partial S/\partial E \) is constant or undefined over a range; temperature stays fixed while energy changes, and the smooth maximization is replaced by the common-tangent (Maxwell) construction.
  • Small systems. When \(N\) is not large the entropy maximum is broad, fluctuations of \(E_A\) are comparable to \(E_A\) itself, and a single sharp \(T\) does not exist — one must work with the full probability distribution, not its peak.
  • Negative-temperature or bounded-spectrum systems. If the density of states decreases with energy (e.g. a spin system with an energy ceiling), \( \partial S/\partial E<0 \) so \(T<0\); the maximization still holds formally but "hotter than infinite" ordering inverts naive intuition.
Failure modes
  • Sign error on \(\mu\). Writing \( \mu/T = +\partial S/\partial N \). The minus sign is required so that \( dE=T\,dS-p\,dV+\mu\,dN \) and so particles flow toward lower \(\mu\); dropping it reverses the direction of diffusion.
  • Forgetting to reciprocate. Claiming \( T=\partial S/\partial E \) instead of \( 1/T=\partial S/\partial E \). Then temperature would go to zero as the entropy slope grows — backwards.
  • Holding the wrong variables fixed. Evaluating \( \partial S/\partial E \) at fixed \(T\) or \(p\) rather than at fixed \(V,N\). The definitions are specifically the natural-variable derivatives of \( S(E,V,N) \).
  • Treating \(dE_A\) and \(dE_B\) as independent. Ignoring \( dE_B=-dE_A \) and setting each subsystem's derivative to zero separately, which would wrongly force \( \partial S/\partial E=0 \) rather than an equality across the wall.
  • Assuming the extremum is automatically a maximum. Skipping the concavity check; \( dS=0 \) also holds at unstable saddle points that trigger phase separation.
  • Confusing chemical potential with a potential energy. Reading \(\mu\) as "the energy of one particle" rather than the entropic cost/benefit of adding a particle at fixed \(E,V\).
Discussion

The deep content is that temperature, pressure and chemical potential are defined by how entropy responds to changes in energy, volume and particle number — they are geometric slopes of the fundamental surface \( S(E,V,N) \), not primitive concepts. Classical thermodynamics postulates \( dE=T\,dS-p\,dV+\mu\,dN \); statistical mechanics, via \( S=k_B\ln\Omega \), derives it, giving each intensive variable a microscopic meaning. Temperature measures how sharply the number of accessible microstates grows with energy; a large heat capacity is just a slowly changing slope.

The equilibrium conditions \( T_A=T_B \), \( p_A=p_B \), \( \mu_A=\mu_B \) are the statistical origin of the zeroth law and of the direction of spontaneous change. Nothing here invokes forces or dynamics: the arrow of heat flow is pure counting. Energy redistributes to the partition \( (E_A,E_B) \) that has, by an astronomically large factor, the most microstates. That the peak is sharp — that macroscopic bodies have definite temperatures at all — rests on \(N\) being of order \(10^{23}\), which makes the Gaussian around the maximum vanishingly narrow.

At the next level of rigour the equalities are only the first-order (stationarity) conditions; genuine stability requires the entropy to be concave, \( d^2 S\le 0 \), equivalently that the Hessian of \( S(E,V,N) \) be negative-semidefinite. This yields the stability inequalities \( C_V\ge 0 \) and \( \kappa_T\ge 0 \): a fluctuation that moves energy or volume from \(A\) to \(B\) must lower the total entropy so the system returns. Where concavity fails — inside a spinodal, or for systems with long-range forces — the homogeneous state is not the entropy maximum, and the true maximum is an inhomogeneous, phase-separated configuration reached by the Maxwell common-tangent construction. This is why the same variational principle that defines \(T,p,\mu\) also predicts phase transitions.

Common misconceptions. A hotter body is not the one whose entropy increases faster with energy — the opposite: \( 1/T=\partial S/\partial E \) means the steeper slope is the colder body. Chemical potential is not a potential energy per particle; it is the entropic exchange rate \( -T\,\partial S/\partial N \) and can be negative (as for a classical ideal gas). And equilibrium is not the state of maximum entropy of one subsystem — it is the maximum of the total, which is why the condition is an equality between subsystems, not an extremum of either alone.

Worked examples
1
Two equal-sized copper blocks, heat capacity \( C=390\ \mathrm{J\,K^{-1}} \) each, start at \( T_A=350\ \mathrm{K} \) and \( T_B=290\ \mathrm{K} \), joined by a rigid diathermal wall (energy only). Find the final temperature and the total entropy change.
Rigid, impermeable wall: only \( \partial S/\partial E \) equalizes, so \(T_A=T_B=T_f\). A
2
\[ C\,(T_f-T_A) + C\,(T_f-T_B)=0 \;\Rightarrow\; T_f=\tfrac{1}{2}(T_A+T_B) \]
Energy conservation for equal capacities; the equilibrium slope condition gives a common temperature. A
3
\[ T_f = \tfrac{1}{2}(350+290)\ \mathrm{K}=320\ \mathrm{K} \]
Insert numbers. A
4
\[ \Delta S = C\ln\frac{T_f}{T_A} + C\ln\frac{T_f}{T_B} = 390\left(\ln\tfrac{320}{350}+\ln\tfrac{320}{290}\right)\ \mathrm{J\,K^{-1}} \]
Each block \( dS=C\,dT/T \) integrated; using \( 1/T=\partial S/\partial E \) with \( dE=C\,dT \). B
\[ T_f=320\ \mathrm{K}, \qquad \Delta S = 390(-0.0896+0.0985)= +3.5\ \mathrm{J\,K^{-1}} \]

Reading. Heat flows from the hot block to the cold one until the entropy slopes match at \( T_f=320\ \mathrm{K} \); the total entropy rises by \(3.5\ \mathrm{J\,K^{-1}}\), confirming the process is spontaneous and irreversible.

Units check. \( C\ln(\cdot) \) has units \( \mathrm{J\,K^{-1}} \) (log is dimensionless), matching \(\Delta S\).

1
A cylinder is split by a frictionless, adiabatic piston (movable, impermeable). Left side: \( n_A=2\ \mathrm{mol} \) ideal gas; right side: \( n_B=1\ \mathrm{mol} \); total volume \( V=30\ \mathrm{L} \), held at common \( T=300\ \mathrm{K} \). Find the equilibrium volumes.
Movable impermeable wall: entropy maximization gives \( p_A=p_B \) (and \( T_A=T_B \)); use \( \partial S/\partial V=p/T \). A
2
\[ \frac{p_A}{T}=\frac{\partial S_A}{\partial V_A}=\frac{n_A R}{V_A},\qquad \frac{p_B}{T}=\frac{n_B R}{V_B},\qquad p_A=p_B \;\Rightarrow\; \frac{n_A}{V_A}=\frac{n_B}{V_B} \]
Ideal-gas entropy \( \partial S/\partial V=nR/V \); equal pressures from the volume-slope condition. B
3
\[ V_A=V\frac{n_A}{n_A+n_B},\qquad V_B=V\frac{n_B}{n_A+n_B} \]
Solve with \( V_A+V_B=V \). A
4
\[ V_A=30\cdot\tfrac{2}{3}=20\ \mathrm{L},\qquad V_B=30\cdot\tfrac{1}{3}=10\ \mathrm{L} \]
Insert numbers. A
\[ V_A=20\ \mathrm{L},\quad V_B=10\ \mathrm{L},\quad p_A=p_B=\frac{n_A R T}{V_A}=\frac{2\cdot 8.314\cdot 300}{0.020}\approx 2.5\times10^{5}\ \mathrm{Pa} \]

Reading. The piston settles where the volume slopes of entropy match, i.e. equal pressures; the gas with twice the moles claims twice the volume, both at \(\approx 2.5\ \mathrm{bar}\).

Units check. \( nRT/V = \mathrm{mol}\cdot\mathrm{J\,mol^{-1}K^{-1}}\cdot\mathrm{K}/\mathrm{m^3}=\mathrm{J\,m^{-3}}=\mathrm{Pa} \).

Problems
  1. Starting from \( S(E)=\tfrac{3}{2}Nk_B\ln E + \text{const} \) for a monatomic ideal gas at fixed \(V,N\), derive the relation between \(E\) and \(T\).
    Solution \( \frac{1}{T}=\frac{\partial S}{\partial E}=\frac{3}{2}\frac{Nk_B}{E} \), so \( E=\frac{3}{2}Nk_BT \). Each degree of freedom carries \( \tfrac{1}{2}k_BT \): three translational modes give \( \tfrac{3}{2}k_BT \) per atom, the equipartition result.
  2. Two systems exchange only particles at fixed \(E,V\). Show that equilibrium requires equal chemical potential, and state the direction of particle flow if \( \mu_A>\mu_B \).
    Solution With \(dE_A=dV_A=0\), \( dS_{\text{tot}}=\big(\frac{\partial S_A}{\partial N_A}-\frac{\partial S_B}{\partial N_B}\big)dN_A=-\frac{1}{T}(\mu_A-\mu_B)dN_A \). Setting it to zero gives \( \mu_A=\mu_B \). If \( \mu_A>\mu_B \), then \( dS_{\text{tot}}>0 \) requires \( dN_A<0 \): particles leave \(A\) and flow to the lower-\(\mu\) system \(B\).
  3. A block of heat capacity \( C=500\ \mathrm{J\,K^{-1}} \) at \( 400\ \mathrm{K} \) is placed in contact with a huge reservoir at \( 300\ \mathrm{K} \). Compute \(\Delta S_{\text{block}}\), \(\Delta S_{\text{reservoir}}\) and \(\Delta S_{\text{tot}}\).
    Solution \( \Delta S_{\text{block}}=C\ln\frac{300}{400}=500\ln 0.75=-143.8\ \mathrm{J\,K^{-1}} \). Heat given to reservoir \( Q=C(400-300)=5.0\times10^4\ \mathrm{J} \) at \(300\ \mathrm{K}\): \( \Delta S_{\text{res}}=+Q/T=50000/300=+166.7\ \mathrm{J\,K^{-1}} \). Total \( \Delta S_{\text{tot}}=+22.9\ \mathrm{J\,K^{-1}}>0 \), so the process is spontaneous.
  4. For a two-level spin system the entropy as a function of energy is \( S(E)=k_B\ln\Omega(E) \) with \( \Omega \) peaked at \(E=0\) and decreasing for \(E>0\). Explain how \( 1/T=\partial S/\partial E \) can be negative and what "negative temperature" means physically.
    Solution Above the energy that maximizes \(\Omega\), adding energy reduces the number of microstates, so \( \partial S/\partial E<0 \) and \( T<0 \). Such a state has a population inversion (more spins in the high-energy level). It is "hotter than \(T=+\infty\)": placed in contact with any positive-\(T\) body it gives up energy. Negative \(T\) arises only for systems with a bounded energy spectrum, where \(\Omega\) is non-monotonic in \(E\).
  5. A membrane permeable to solvent (not solute) separates pure solvent (side \(B\)) from a dilute solution (side \(A\)) at common \(T\). Using \( \mu_A=\mu_B \) for the solvent and the dilute-solution result \( \mu_A=\mu^0 - k_B T\, x_s + (\text{pressure term}) \) with solute mole fraction \(x_s\), derive the osmotic pressure \( \Pi \) (van 't Hoff). Take \( x_s=0.010 \), \( T=298\ \mathrm{K} \), solvent molar volume \( \bar v=1.8\times10^{-5}\ \mathrm{m^3\,mol^{-1}} \).
    Solution Equality of solvent chemical potential requires the pressure term to offset the concentration lowering: \( \bar v\,\Pi = R T\, x_s \) per mole, i.e. \( \Pi = \frac{RT\,x_s}{\bar v} \). Numerically \( \Pi = \frac{8.314\cdot 298\cdot 0.010}{1.8\times10^{-5}} \approx 1.38\times10^{6}\ \mathrm{Pa}\approx 13.6\ \mathrm{atm} \). Equivalently, in dilute form \( \Pi = c\,RT \) with \( c\approx x_s/\bar v \) the solute concentration — van 't Hoff's law, following directly from \( \mu_A=\mu_B \).