Problem #\(1\): Derive the Maxwell relation for a gas:
\[\left(\frac{\partial S}{\partial V}\right)_T=\left(\frac{\partial p}{\partial T}\right)_V\]
And explain why Maxwell relations in general should be viewed as much more than just mathematical identities.
Solution #\(1\): Here it is clear that one is viewing \((T,V)\) as independent variables, and the corresponding energy which has these as its natural variables is the Helmholtz energy \(F\). This has the differential:
\[dF=-SdT-pdV\]
So by Clairaut’s theorem:
\[\frac{\partial^2F}{\partial T\partial V}=\frac{\partial^2F}{\partial V\partial T}\]
\[\left(\frac{\partial p}{\partial T}\right)_V=\left(\frac{\partial S}{\partial V}\right)_T\]
All Maxwell relations (for a gas system described by state space \((p,V)\)) can be boiled down to the Jacobian determinant:
\[\frac{\partial (p,V)}{\partial (T,S)}=1\]
which expresses the area/orientation-preserving property of the state space transformation \((p,V)\to(T,S)\). So the point is that thermodynamics is really a theory of geometry (cf. special relativity), the geometry of equilibrium states.
In any Maxwell relation, one partial derivative represents a process which is experimentally accessible, while the other side represents an experimentally difficult quantity to measure (this is typically the entropy \(S\)) but which is in some way seeking to understand microscopic detail. Even to measure (changes in) entropy, one typically measures heat capacities…but the partial derivative is being taken at constant \(T\)! So always write Maxwell relations in a way that agrees with the usual convention in math of putting the dependent variable on the LHS and independent variables on the RHS, in this case putting the experimentally difficult partial derivative on the LHS and the experimentally accessible one on the RHS.
Problem #\(2\): For a gas, what does it mean to have complete thermodynamic information?
Solution #\(2\): Knowing \(N,V,T,\mu,p,S\). For instance, if one specifies a function \(F=F(N,V,T)\) for the Helmholtz energy, then this provides one with complete thermodynamic information since one can obtain \(\mu=\frac{\partial F}{\partial N}, p=-\frac{\partial F}{\partial V},S=-\frac{\partial F}{\partial T}\). Since the Helmholtz free energy is equivalent to giving the canonical partition function \(F=-k_BT\ln Z\), this is unsurprising.
Problem #\(3\): What are the assumptions required for each of the following differential equalities to be true?
\[dE=\bar dQ+\bar dW\]
\[\bar dQ=TdS\]
\[\bar dW=-pdV+\mu dN\]
\[dE=TdS-pdV+\mu dN\]
Solution #\(3\): All \(4\) equations require one to go between \(2\) (infinitesimally separated) equilibrium states. In other words, this is thermodynamics! With this in mind, the first equation is then always true regardless of the path one takes between those \(2\) equilibrium states (because \(E\) is a state function). However, the \(2^{\text{nd}}\) and \(3^{\text{rd}}\) equations are true iff the path by which one goes between those \(2\) equilibrium states is reversible (since \(\bar dW\) and \(\bar dQ\) are now path functions); if the path were irreversible then both equalities would instead become inequalities! Finally, although at first one may think the \(4^{\text{th}}\) equation is only true for a reversible path, in fact because \(dE\) is an exact \(1\)-form (whereas \(\bar dW,\bar dQ\) are inexact), it is again always true, reversible or irreversible, since at the end of the day all that matters for state functions is the initial and final states.
In the case of \(E\) for a gas, clearly its extensive natural variables are \(N,V,S\), while its intensive derived variables are \(\mu, p, T\).
This also makes it clearer what the \(1^{\text{st}}\) law of thermodynamics is really saying, i.e. the sum of the inexact \(1\)-forms \(\bar dQ+\bar dW\) is (nontrivially!) an exact \(1\)-form that one happens to call \(dE\). Put another way, it is rooted in a bedrock belief that conservation of energy should hold even in the presence of heat transfer \(\bar dQ\).
Problem #\(4\): What is the difference between a quasistatic and a reversible process?
Solution #\(4\): Reversible processes are a subset of quasistatic processes. More precisely:
\[\text{Reversible}=\text{Quasistatic}+\text{No Friction}\]
where \(\text{No Friction}\) can also be interpreted as “adiabatic” or “isentropic”. Reversible really means time reversible.
Problem #\(5\): Prove Euler’s homogeneous function theorem, i.e.:
\[V(\lambda\textbf x)=\lambda^n V(\textbf x)\Leftrightarrow \textbf x\cdot\frac{\partial V}{\partial\textbf x}=nV(\textbf x)\]
Hence, by appealing to extensivity of the energy \(E=E(N,V,S)\), obtain the Gibbs-Duhem relation:
\[SdT-Vdp+Nd\mu=0\]
Solution #\(5\): Just differentiate \(\left(\frac{\partial}{\partial\lambda}\right)_{\lambda=1}\) (recognize this as the precursor of the virial theorem!). Extensivity of the energy is equivalent to the \(n=1\) case of Euler’s homogeneous function theorem, i.e.
\[N\frac{\partial E}{\partial N}+V\frac{\partial E}{\partial V}+S\frac{\partial E}{\partial S}=E\]
\[E=TS-pV+\mu N\]
Taking the differential of both sides:
\[dE=TdS-pdV+\mu dN+SdT-Vdp+Nd\mu\]
so because \(dE=TdS-pdV+\mu dN\), the latter part must vanish, which is the Gibbs-Duhem relation.
Problem #\(6\): Using the Gibbs-Duhem relation, prove the Clausius-Clapeyron equation for a single-component system at a \(1^{\text{st}}\)-order phase boundary/coexistence curve:
\[\frac{\partial p}{\partial T}=\frac{\Delta S}{\Delta V}\]
Solution #\(6\): For each phase of the single-component system, one has a Gibbs-Duhem relation which can be written in the form:
\[S_1dT_1-V_1dp_1+N_1d\mu_1=0\]
\[S_2dT_2-V_2dp_2+N_2d\mu_2=0\]
Now, the defining property of a phase boundary is that the \(2\) phases are in equilibrium, so the intensive variables between the \(2\) phases are equal everywhere on the phase boundary \(T_1=T_2:=T,p_1=p_2:=p,\mu_1=\mu_2:=\mu\). So moving infinitesimally along this phase boundary, it is a rigorous corollary that \(dT_1=dT_2:=dT,dp_1=dp_2:=dp,d\mu_1=d\mu_2:=d\mu\). But now one has \(2\) equations and \(3\) unknowns \(dT,dp,d\mu\):
\[S_1dT-V_1dp+N_1d\mu=0\]
\[S_2dT-V_2dp+N_2d\mu=0\]
Eliminating \(d\mu\) yields the Clausius-Clapeyron equation:
\[\frac{dp}{dT}=\frac{S_2/N_2-S_1/N_1}{V_2/N_2-V_1/N_1}\]
Or in terms of molar entropies \(s:=S/n\) and molar volumes \(v:=V/n\), where \(n:=N/N_A\):
\[\frac{dp}{dT}=\frac{\Delta s}{\Delta v}\]
So in other words, phase transitions are all about parameters changing discontinuously, and in this case the discontinuous changes \(\Delta s,\Delta v\) are directly also what influence the slope of the phase boundary.
Because the phase transition occurs isothermally at temperature \(T\), one can also write \(\Delta s:=q_L/T\) where \(q_L\) is the molar latent heat released during the phase transition. And often, if it’s a liquid-to-gas phase transition, the molar volume of liquid water \(v_{\ell}\approx\) is significantly less than the molar volume of water vapor \(v_{\text H_2\text O(\text g)}\approx\), so it is common to approximate \(\Delta v\approx v_g\approx RT/p\) (if the gas is ideal) so that \(q_L\) refers to the specific latent heat of vaporization \(\ell\to\text g\) and, assuming \(q_L\) to be approximately \(T\)-independent, the Clausius-Clapeyron equation can be integrated to yield the equation of the phase boundary itself:
\[p=p_0\exp-\frac{q_L}{R}\left(\frac{1}{T}-\frac{1}{T_0}\right)\]
where in this context \(p\) is called the vapor pressure. Alternatively, written in the form:
\[\ln p-\ln p_0=-\frac{q_L}{R}\left(\frac{1}{T}-\frac{1}{T_0}\right)\]
shows that \(q_L\) can be experimentally determined through linear regression of \(\ln p\) vs. \(1/T\).
Finally, note that earlier the choice was made to eliminate \(d\mu\) to isolate for \(dp/dT\); however one could just as well have eliminated \(dp\) to isolate for \(d\mu/dT\) or eliminated \(dT\) to obtain \(dp/d\mu\)…each giving rise to its own kind of Clausius-Clapeyron equation.
Problem #\(7\): Using the fact that in a closed cycle \(\oint dE=0\), write \(dE=TdS-pdV+\mu dN\) and apply Stokes’ theorem to obtain suitable Maxwell relations.
Solution #\(7\): Stokes’ theorem needs a curve and a surface with that as its boundary curve. First, consider looking at just motion in the \((S,V)\)-plane so that \(dN=0\). Then Stokes’ theorem reduces to Green’s theorem in that plane:
\[0=\oint TdS-pdV=\oint\begin{pmatrix} T\\-p\end{pmatrix}\cdot\begin{pmatrix}dS\\dV\end{pmatrix}=\iint\left(-\frac{\partial p}{\partial S}-\frac{\partial T}{\partial V}\right)dSdV\]
Hence one obtains the Maxwell relation:
\[\left(\frac{\partial p}{\partial S}\right)_{N,V}=-\left(\frac{\partial T}{\partial V}\right)_{N,S}\]
Working in the \((N,S)\) plane or \((N,V)\) plane produces \(2\) other Maxwell relations.
Problem #\(8\): Equation of state as a constitutive relation/dispersion relation/heart of the physics. Want to distinguish clearly between this and all the kinematic Maxwell relations, definitions, etc.
Equations of state will never involve entropy \(S\), the experimentally inaccessible bastard. So when one encounters any \(\partial S\) quantities, the immediate knee-jerk reaction should be to convert it to a corresponding \(\partial T\) derivative which is more readily measurable.
All the usual shorthands for special collections of partial derivatives like heat capacities, thermal expansion coefficients, compressibilities/bulk moduli, and other moduli are singled out for this special treatment because they are often found to be constant material parameters?
\[C_V:=\left(\frac{\partial E}{\partial T}\right)_V\]
\[C_{\sigma}:=\]
\[\alpha=\left(\frac{\partial V}{\partial T}\right)_{\sigma}\]
\[\kappa_T=\frac{1}{V}\left(\frac{\partial V}{\partial\sigma}\right)_T\]
Solution #\(8\):
Problem: In general, the energy may be written abstractly as a linear combination of \(N\) extensive natural variables \(Q_i\) (thought of as “generalized charges/coordinates“) weighted by their \(N\) conjugate intensive derived variables \(\phi_i\) (thought of as “generalized potentials/forces“):
\[E=\sum_{i=1}^N\phi_iQ_i\]
For instance, temperature \(T\) can be thought of as an “entropy potential” as entropy \(S\) flows via heat from high \(T\) to low \(T\). Similarly, \(\sigma=-p\) is a “volume potential”, thus volume \(V\) flows from high \(\sigma\) to low \(\sigma\), aka from low \(p\) to high \(p\) (this is consistent with the usual interpretation of pressure \(p\) as a force acting on the piston walls). Similarly, particles \(N\) flow from high chemical potential \(\mu\) to low \(\mu\). In general, charge \(Q_i\) flows from high potential \(\phi_i\) to low \(\phi_i\).
How many Maxwell relations can be obtained from \(E\) alone and what is their general form?
Solution: There are \(N\choose{2}\)\(=\frac{N(N-1)}{2}\) Maxwell relations that can be wringed out from this equilibrium potential \(E\) alone. Because there are no fiddly minus signs in this series, it is clear that there won’t be any fiddly minus signs in the corresponding Maxwell relations. In this case, all Maxwell relations will have the form:
\[\left(\frac{\partial\phi_1}{\partial Q_2}\right)_{Q_1,Q_3,…}=\left(\frac{\partial\phi_2}{\partial Q_1}\right)_{Q_2,Q_3,…}\]
Problem: For a closed single-component \(3\)D gas in equilibrium, how many independent intensive variables parameterize the equilibrium manifold of the system?
Solution: The Gibbs phase rule (analogous to Euler’s graph formula \(F+V=E+2\)) asserts:
\[I+P=C+2\Rightarrow I+1=1+2\Rightarrow I=2\]
So one is always free to select any \(2\) intensive potentials such that when their values are fixed, so too automatically are the values of all other intensive potentials at equilibrium. It’s a bit like saying if a mass is acted on by forces \(\textbf F_1,\textbf F_2,\textbf F_3\), and one is told \(\textbf F_1,\textbf F_2\), then because the mass is in translational equilibrium the value of \(\textbf F_3=-\textbf F_1-\textbf F_2\) is fixed.
Problem: For a single-component \(3\)D gas with energy/Hamiltonian:
\[E=TS+\sigma V+\mu N\]
Explain whether the following partial derivatives are (in general) well-posed or not. For those that are well-posed, write down their associated Maxwell relation.
\[\left(\frac{\partial S}{\partial V}\right)_{N}\]
\[\left(\frac{\partial S}{\partial V}\right)_{T,V,\mu}\]
\[\left(\frac{\partial S}{\partial V}\right)_{T,N}\]
\[\left(\frac{\partial T}{\partial V}\right)_{\sigma, N}\]
\[\left(\frac{\partial T}{\partial \mu}\right)_{\sigma, N}\]
\[\left(\frac{\partial T}{\partial S}\right)_{\sigma, N}\]
\[\left(\frac{\partial T}{\partial E}\right)_{V, N}\]
\[\left(\frac{\partial H}{\partial T}\right)_{V, N}\]
\[\left(\frac{\partial T}{\partial G}\right)_{\sigma, \mu}\]
\[\left(\frac{\partial V}{\partial \mu}\right)_{S,E}\]
\[\left(\frac{\partial T}{\partial V}\right)_{S,\sigma}\]
Solution: It is useful to define the notion of a natural variable set to be any energy together with its set of natural variables which are the natural variables of some energy. Starting from the fundamental natural variable set:
\[\{E,S,V,N\}\]
Legendre transforms give all \(8\) of the other natural variable sets:
\[\{F,T,V,N\}\]
\[\{H,S,\sigma,N\}\]
\[\{G,T,\sigma,N\}\]
\[\{\Phi,T,V,\mu\}\]
and \(3\) other combinations that don’t seem to have a name. Anyways, the point is that the Gibbs phase rule gives \(I=2\), but it doesn’t count the extensivity degree of freedom which is always present because that doesn’t affect equilibrium, hence explaining why all natural variable sets have \(2+1=3\) variables. Moreover, as should be clear from the fact that one is Legendre transforming, no variable appears with its conjugate in the same natural variable set.
This then provides a litmus test for whether a partial derivative is ill-posed or not; just see if the variables in the subscript together with either the variable in the numerator or the variable in the denominator can be made to form a natural variable set or not; more simply, can one form a set which is not cohabited by conjugate variables (is there a notion of conjugate variables for the energies like \(E,F,\)etc, themselves that makes the Maxwell relations continue to hold)?


(aside: actually this last partial derivative should be undefined? because holding both \(\sigma,\mu\) constant amounts to holding \(T\) constant since they’re intensive…?)
Also, given any \(2\) extensives \(E_1,E_2\) and any \(2\) distinct intensives \(I_1\neq I_2\), the partial derivative:
\[\left(\frac{\partial E_1}{\partial E_2}\right)_{I_1,I_2}=\frac{E_1}{E_2}\]
this follows because \(E_1/E_2\) is intensive so equal to a constant \(\lambda=\lambda(I_1,I_2)\), so \(E_1=\lambda E_2\Rightarrow \partial E_1/\partial E_2=\lambda=E_1/E_2\).
Aside: when intensive and intensive or extensive and extensive bunch together like bosons, then the Maxwell relation has a minus sign. Similarly, intensive and extensive antibunch like fermions but that gives a + sign Maxwell relation. It seems that, roughly speaking, the individual intensive/extensive variables can treated like fermions, in the sense that starting with any Maxwell relation and exchanging \(\phi_i\Leftrightarrow Q_i\) gives a minus sign. And obviously equality is symmetric which is really a reflection of the fact that 2 fermions together make a boson.
Problem: For a single-component system, what are the \(3\) standard intensive equilibrium material properties?
Solution: The compressibility (either the isothermal one \(\kappa_T\) or the isentropic one \(\kappa_S\), and equivalently one can use the isothermal bulk modulus \(B_T\) or the isentropic bulk modulus \(B_S\)), the specific heat capacity (either \(c_V\) or \(c_p\) and note it could be per unit mass or per unit mole, etc.) and the thermal expansion coefficient \(\alpha\). The definitions are here.
Problem: Using the compressible Bernoulli’s equation, show that enthalpy is conserved in a Joule-Thomson expansion. Define the corresponding Joule-Thomson coefficient \(\mu_{\text{JT}}\) and show that \(\mu_{\text{JT}}=0\) for ordinary Joule expansion of an ideal gas.
Solution: The compressible Bernoulli equation looks like the usual Bernoulli equation but with the addition of the gas’s specific energy \(e\):
\[p+\frac{1}{2}\rho v^2+\rho\phi+e=\text{const.}\]
The terms \(h:=e+p\) are nothing more than the specific enthalpy of the gas.
In Joule-Thomson expansion, it is conventional to assume the macroscopic energy density \(\frac{1}{2}\rho v^2+\rho\phi\) is constant throughout the expansion, so this implies that \(h\) is conserved.
Alternatively, one can imagine a setup in which gas at a higher (but constant) pressure \(p\) is throttled through a porous plug to a region of lower (constant) pressure \(p'<p\). Then, the gas behind does work \(pV\) on the gas that passes through, and similarly the gas that expands in the other side does work \(p’V\) on the gas in front of it (too lazy to draw this). It’s as if there were fictitious pistons on either side of the plug…assuming the whole thing is enclosed in adiabatic walls, so \(Q=0\), then from the first law of thermodynamics, \(\Delta H=0\).
The Joule-Thomson temperature change \(\Delta T_{\text{JT}}\) is familiar in everyday life. For instance, when opening a bike tire valve, the pressure inside is initially a few atmospheres higher than the ambient atmospheric pressure, but as the gas escapes (isenthalpically) it cools down, causing the tire valve to feel cold to the touch. Physically, for a non-ideal gas, expansion increases potential energy, reducing kinetic energy, hence cooling the gas.
In general, the Joule-Thomson coefficient:
\[\mu_{\text{JT}}:=\left(\frac{\partial T}{\partial p}\right)_{H,N}=\frac{V}{C_p}\left(\alpha T-1\right)\]
quantifies this cooling across a pressure differential (for most gases at room temperature, the Joule-Thomson coefficient is positive and of order \(\mu_{\text{JT}}\sim 0.1\frac{\text J}{\text{atm}}\), hence explaining the cooling rather than heating normally observed).
For an ideal gas, \(\alpha=1/T\) so there is no associated Joule-Thomson cooling/heating across a pressure differential. The inversion point is when \(\mu_{\text{JT}}=0\).
Problem: Distinguish between heat engines, refrigerators, and heat pumps.
Solution: A heat engine \(\textbf x_E(t)\) is an abstraction of any periodic process \(\textbf x_E(t+\Delta t)=\textbf x_E(t)\) whose net outcome in each period \(\Delta t\) is to convert some amount of (useless!) heat \(Q_H>0\) into (useful!) work \(W>0\) (thus, both \(Q_H\) and \(W\) are normalized per orbit of the heat engine \(\textbf x_E(t)\) in a suitable state space). It thus makes sense to define the efficiency \(\eta\) of a heat engine by the buck-to-bang ratio:
\[\eta:=\frac{W}{Q_H}\]
Kelvin’s formulation of the \(2^{\text{nd}}\) law of thermodynamics is logically equivalent to the assertion that the efficiency \(\eta\) of any heat engine \(\textbf x_E(t)\) must obey:
\[\eta<1\]
though in theory \(\eta\) can get arbitrarily close to \(1\). Schematically, for each orbit:

Since \(E\) is a function of the engine’s state \(\textbf x_E(t)\) only, over each \(\Delta t\)-orbit, \(\oint dE=0\) so the first law of thermodynamics guarantees \(\oint\bar dQ+\oint\bar dW=0\). This guarantees that \(Q_H=W+Q_C\) over each engine period \(\Delta t\).
Both refrigerators and heat pumps are basically the same thing (note: refrigerators are not called “heat refrigerators” even though that would have been more consistent with “heat engine” and “heat pump”). They are also both abstractions of any periodic process whose net outcome in each period is to remove some amount of heat \(Q_C>0\) from a colder place and dump some of that heat \(Q_H>0\) into a hotter place, fighting an uphill battle against the spontaneous direction that heat would otherwise flow (i.e. from hotter to colder). The difference between refrigerators and heat pumps is simply a matter of emphasis; in the case of refrigerators, the goal is to remove as much heat \(Q_C\) from the cold place as possible, whereas for heat pumps the goal is to dump as much heat \(Q_H\) into the hot place as possible. Schematically, for each orbit:

Clausius’s formulation of the \(2^{\text{nd}}\) law of thermodynamics is logically equivalent to the assertion that for any refrigerator or heat pump, \(Q_H<Q_C\). This implies that some external work \(W>0\) must be done each cycle to facilitate this heat transfer. This motivates the corresponding definitions of the coefficient of performance \(\text{COP}\) for a refrigerator:
\[\text{COP}:=\frac{Q_C}{W}\]
and a heat pump:
\[\text{COP}:=\frac{Q_H}{W}\]
Problem: Explain what the reversibility theorem (also misleadingly called “Carnot’s theorem”) asserts.
Solution: The notions of heat engines and refrigerators/heat pumps are very general, and a priori there is no requirement about “using a hot reservoir \(T_H\) and a cold reservoir \(T_C\)”. However, if one restricts one’s scope to just the subset of heat engines and refrigerators/heat pumps operating only between \(2\) heat reservoirs \(T_H,T_C\), then within this subset one can prove that reversible cycles are the most efficient in all cases (i.e. for heat engines they maximize \(\eta\), and for refrigerators/heat pumps they maximize \(\text{COP}\)).
Problem: Show that the specific example of a Carnot cycle is reversible (though it certainly isn’t the only reversible cycle one can take), and hence compute \(\eta\) for a Carnot heat engine and \(\text{COP}\) for both a Carnot refrigerator and a Carnot heat pump, thus obtaining upper bounds on these values within the subsets described earlier.
Solution: The key is that every step of the Carnot cycle is reversible, regardless of whether it is run as a heat engine or as a refrigerator/heat pump. The universal way to depict the Carnot cycle is on the \((T,S)\)-plane:

Any other depiction of the Carnot cycle, such as in the \((p,V)\)-plane using an ideal gas working substance is then simply a geometric deformation of this rectangle:

For a Carnot heat engine, the efficiency is:
\[\eta=1-\frac{T_C}{T_H}<1\]
For a Carnot refrigerator, the coefficient of performance is:
\[\text{COP}=\frac{T_C}{T_H-T_C}\]
And for a Carnot heat pump:
\[\text{COP}=\frac{T_H}{T_H-T_C}\]
Problem: By a Stokes-like maneuver, any reversible cycle can be decomposed into a bunch of Carnot “vortices” (more precisely, isothermal and adiabatic segments). Hence, establish the Clausius inequality:
\[\oint\frac{\overline{d}Q}{T}\leq 0\]
with equality if and only if the cycle is reversible (e.g. a Carnot cycle).
Solution:
The fact that \(\oint\frac{\overline{d}Q}{T}=0\) in the space of reversible cycles implies that there exists a conservative field \(S\) called the entropy that only depends on the initial and final equilibrium states.