Welcome back. In our previous lessons, we established the fundamental connections between the partition functions of the canonical and grand canonical ensembles and their corresponding thermodynamic potentials, the Helmholtz free energy and the grand potential :
These equations are the bridges from the microscopic details of a system to its macroscopic thermodynamic properties. Today, we will cross these bridges.
Our objective is to systematically derive the expressions for all key thermodynamic observables—entropy, pressure, internal energy, and particle number—as partial derivatives of the logarithm of the appropriate partition function. You will see that once the partition function is calculated, it acts as a generating function from which the entire thermodynamics of the system can be extracted by differentiation. This powerful and elegant procedure is the computational core of equilibrium statistical mechanics.
1. Observables from the Canonical Partition Function ()
Let's begin with a closed system described by the canonical ensemble, where the number of particles , volume , and temperature are fixed. The natural thermodynamic potential is the Helmholtz free energy , whose differential is given by the fundamental thermodynamic relation:
By treating as a function of , , and , we can identify each thermodynamic variable with a partial derivative.
Entropy and Energy
From the differential , we can immediately see that entropy is the negative partial derivative of the free energy with respect to temperature at constant volume and particle number:
Substituting , we can find the entropy directly from the partition function:
This can be written more compactly using the product rule in reverse:
Once we have the entropy, we can find the average internal energy using the definition of the Helmholtz free energy, :
This result is often expressed more elegantly using the inverse temperature . Using the chain rule, , we find the familiar and powerful relation:
The following reading provides a clear, step-by-step derivation of these results.
These notes by Dexter Chua offer a concise and rigorous derivation of the key observables from the canonical partition function.
Please read through the subsection "1.3 The canonical ensemble". First, see how the average energy \langle E \rangle is derived as a derivative of \log Z with respect to \beta. Next, in the part on Entropy, follow the derivation that begins with the Gibbs entropy S = -k \sum p(n) \log p(n) and arrives at the expression for entropy in terms of Z. Finally, in the subsection "1.4 Helmholtz free energy", note the relation S = -(\partial F / \partial T)_V and the master equation F = -kT log Z.
Pressure
Next, we turn to pressure. From , we can identify pressure as:
The conceptual step of connecting the thermodynamic work to a statistical mechanical average can be subtle. It relies on the adiabatic theorem from quantum mechanics, which states that for a slow (adiabatic) change in a system parameter like volume, the system does not jump between quantum states. This ensures that the process is isentropic (constant entropy), allowing us to make the connection.
Leonard Susskind provides an excellent, in-depth derivation that justifies this relationship with physical reasoning.
Statistical Mechanics Lecture 5
In this lecture from his "Statistical Mechanics" course, Leonard Susskind carefully derives the formula for pressure, starting from first principles. His approach emphasizes the underlying physical and mathematical reasoning, which aligns with your preference for rigor.
Please watch the segment from the definition of pressure. The key steps are: Defining pressure thermodynamically in terms of the work done during an adiabatic (isentropic) volume change: P = -(\partial E / \partial V)_S. Using a Legendre transformation to switch from fixed entropy to fixed temperature, arriving at the crucial result P = -(\partial F / \partial V)_T. Substituting F = -k_B T \log Z to get the final, operational formula for pressure in terms of the partition function.
Following this derivation, we arrive at the direct formula for pressure from the partition function:
Chemical Potential
Finally, for systems where we consider variations in particle number, the chemical potential is given by:
This relation is central to understanding phase equilibria and chemical reactions, though for many problems in the canonical ensemble, is simply a fixed parameter.
2. Observables from the Grand Canonical Partition Function ()
Now, let's consider an open system in contact with a heat and particle reservoir, described by the grand canonical ensemble with fixed . The procedure is perfectly analogous. The governing potential is the grand potential , with its differential:
From this, we can immediately read off the partial derivatives:
- Entropy:
- Pressure:
(Recall from the last lesson that for a homogeneous macroscopic system, , which often provides an even more direct route: .) - Average Particle Number:
To find the average internal energy , we can use the definition , but a more direct path comes from differentiating with respect to while holding and constant. As shown in the previous lesson's derivation of the relation:
Rearranging this gives the expression for the average energy:
The following reading and video provide concise derivations of these results.
Continuing in the Chua notes, this section performs the derivations for the grand canonical ensemble. Note that the notes use \mathcal{Z} for the grand partition function \Xi.
Please read the subsection "1.5 The chemical potential and the grand canonical ensemble". Focus on the series of propositions that derive a relation for \langle E \rangle - \mu \langle N \rangle, the average particle number \langle N \rangle, and the entropy S from derivatives of \log \mathcal{Z}.
Teach Yourself Statistical Mechanics In One Video
The channel "Physics Daemon" offers a very rapid, purely mathematical summary of how the partition function acts as a generating function.
Watch the segment from the start of the derivations. It quickly demonstrates how derivatives of \log Z (the video uses Z for the grand partition function) with respect to \mu, \beta, and V generate \langle N \rangle, \langle E - \mu N \rangle, and P, respectively.
3. Summary and an Illustrative Example
The results from both ensembles can be summarized in a table. This is your master toolkit for solving problems in equilibrium statistical mechanics.
| Observable | Canonical Ensemble () | Grand Canonical Ensemble () |
|---|---|---|
| Free Energy | ||
| Entropy | ||
| Pressure | or | |
| Energy | ||
| Particle # | (fixed) | |
| Chem. Pot. | (fixed) |
Let's apply this formalism to a familiar system: the classical monoatomic ideal gas. This will confirm that our abstract machinery reproduces the well-known laws.
We'll use the grand canonical ensemble, as it is often more direct for gases. From our previous work, we know the grand partition function is:
where is the thermal de Broglie wavelength.
The logarithm is simply:
Now, we turn the crank:
-
Average Particle Number :
Notice that . -
Pressure :
Using the simple relation :
We have derived the ideal gas law from first principles. -
Average Energy :
First, we need the derivative with respect to . Note that , so .
Now we use the formula for :
This is the celebrated result for the internal energy of a monoatomic ideal gas, consistent with the equipartition theorem. The formalism works perfectly. The Susskind video also walks through this ideal gas calculation at the end.
Statistical Mechanics Lecture 5
Susskind applies the pressure formula to the ideal gas, showing how the equation of state emerges naturally.
Watch the final segment of the derivation, from the calculation for the ideal gas. He uses the canonical partition function, Z \propto V^N, to show that P = NkT/V. This complements the grand canonical derivation we just performed.
Conclusion
Today we have assembled the complete operational framework for calculating thermodynamic properties from statistical mechanics. You have seen how, by treating the logarithm of the partition function as a generating function, we can systematically derive expressions for all macroscopic observables through differentiation.
Key Takeaways:
- The fundamental thermodynamic relations and provide the blueprint for connecting observables to derivatives of the free energies.
- Combining these with and allows us to express quantities like as derivatives of or .
- The entire equilibrium thermodynamics of a system is encoded within its partition function. The primary challenge of a statistical mechanics problem reduces to calculating or .
In our next lesson, we will extend this framework by taking second derivatives of the partition functions. As you might anticipate from your study of moment-generating functions, these second derivatives will give us information about the variance, or fluctuations, of thermodynamic quantities like energy and particle number. This will be a crucial step toward understanding the stability of macroscopic systems and the equivalence of the different statistical ensembles.