Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 20

Partition Function and Helmholtz Free Energy

Recommended resources

Welcome back to our study of statistical mechanics. In the previous lesson, we introduced the canonical ensemble to describe systems in thermal equilibrium with a large heat reservoir. This led us to the Boltzmann distribution, , and we defined the canonical partition function, , as the normalization constant for this probability distribution. While this gave us a way to calculate probabilities, the deeper physical meaning of remained to be explored.

This lesson reveals the profound connection between the microscopic world summed up in and the macroscopic world of thermodynamics. Our goal is to show that the partition function is not merely a mathematical convenience but is directly related to a key thermodynamic potential: the Helmholtz free energy, . By establishing the master equation , we will transform the partition function into the central computational tool of the canonical ensemble, providing a bridge from microscopic states to macroscopic observables.

1. Thermodynamic Potentials and the Helmholtz Free Energy

From your previous studies in thermodynamics, you'll recall the fundamental thermodynamic relation for a simple system:

This equation naturally expresses the internal energy as a function of entropy and volume . However, in the canonical ensemble, the natural control variables are temperature and volume , not entropy. To work with these variables, it's mathematically advantageous to use a different thermodynamic potential.

We introduce the Helmholtz free energy, , through a Legendre transformation of the internal energy:

Taking the differential of gives:

This shows that the natural variables for are indeed and . From this exact differential, we can immediately identify expressions for entropy and pressure:

This thermodynamic framework shows that if we could find a way to calculate for a system from its microscopic properties, we would have a direct route to all its macroscopic equilibrium properties. This is precisely what the partition function allows us to do.


2. The Bridge: Deriving the Relation

The crucial link between statistical mechanics and thermodynamics comes from combining the statistical definition of entropy with the Boltzmann distribution. In Module 1, you learned the general form for the entropy of a system described by a probability distribution , known as the Gibbs entropy:

For the canonical ensemble, the probability of being in a microstate with energy is given by the Boltzmann distribution, . Let's substitute this into the entropy formula:

Using the property , we can split the logarithm:

Recognizing that is the definition of the average energy and by normalization, we find:

Since , this simplifies to:

Rearranging this equation gives , which leads directly to our target:

The left-hand side is precisely the definition of the Helmholtz free energy, . Therefore, we have arrived at the central result of this lesson:

This equation is the bridge connecting the microscopic details of the system (the energy levels contained within ) to a macroscopic thermodynamic potential ().

The following reading walks through this exact derivation with great clarity.

Part II - Statistical Physics

This derivation is central to the entire canonical framework. Dexter Chua's notes present it with exceptional clarity. You will see how the statistical definitions of entropy and average energy combine to yield the free energy.

Please read the subsection "Entropy" on page 17, starting from the definition of Gibbs entropy. Follow the calculation through to the result for the canonical ensemble, S = kβ⟨E⟩+ k log Z. Immediately after, read the first two paragraphs of Section 1.4, "Helmholtz free energy," and the final proposition. This will connect the entropy expression you just derived to the thermodynamic definition of F, culminating in the key formula F = -kT log Z.


3. The Physical Significance of Free Energy

The second law of thermodynamics states that an isolated system evolves towards the state of maximum entropy. For a system at constant temperature and volume, the corresponding principle is that it evolves towards the state of minimum Helmholtz free energy. The relation shows that this minimization is a competition between two opposing tendencies: minimizing energy () and maximizing entropy (). At low temperatures, the term dominates, and the system seeks its lowest energy ground state. At high temperatures, the term dominates, and the system favors states with high entropy (i.e., a large number of accessible microstates), even if they have higher energy.

The partition function beautifully captures this competition. A large value of can arise from states with very low energy (making large) or from a vast number of states with moderate energy (many terms in the sum). Since , a larger partition function corresponds to a lower, more favorable free energy.

Given your interest in asymptotic methods, it's worth noting that the canonical free energy can also be viewed as the result of a saddle-point approximation applied to the microcanonical ensemble. The probability of the system having energy is proportional to , where is the microcanonical density of states. The most probable energy, , maximizes this probability, which is equivalent to maximizing the exponent . The Helmholtz free energy is then simply the value of evaluated at this most probable energy, . This establishes the Legendre transform relationship between the two ensembles rigorously.

Equilibrium Statistical Mechanics

To solidify the connection between the canonical and microcanonical pictures, it's insightful to see how the Helmholtz free energy emerges from a saddle-point evaluation of the number of states.

In these notes from MIT, focus on the short section titled "Relation between F(T) and S(E)" on page 58. Notice how F is identified with the Legendre transform of the microcanonical entropy S_m(E). This formally shows that the canonical free energy corresponds to the value of E - TS at the most probable energy E^*, providing a bridge between the ensembles.


4. The Partition Function as a Generating Function

The true power of the relation is that it makes the partition function a "generating function" for all thermodynamic observables. Once we perform the microscopic sum to find , we can derive any macroscopic quantity through differentiation.

Let's re-derive the average energy to see this in action. We know from thermodynamics that . Substituting :

It is often more convenient to work with . Using the chain rule, . Substituting this into our expression for :

This confirms the result we found in the previous lesson, but now derived from the free energy. Similarly, we can find the pressure:

The process is always the same:

  1. Model the system to determine its microstates and their energies, .
  2. Calculate the partition function . This is often the hardest step.
  3. Calculate the free energy .
  4. Calculate any other thermodynamic observable by taking the appropriate derivative of .

The following video provides a good summary of this "generating function" concept.

Teach Yourself Statistical Mechanics In One Video | New & Improved

The true power of the partition function is its role as a "generating function" for all thermodynamic observables. This video provides a nice visual summary of how different derivatives of log Z yield quantities like energy and pressure.

Watch the segment from Applications of the Partition Function. While the video discusses the grand canonical ensemble as well (which we will cover soon), focus on the derivatives for average energy and pressure. The key takeaway is the general method: once you compute Z, you can find any macroscopic average by taking the appropriate derivative of \ln Z.


Conclusion

In this lesson, we have elevated the partition function from a simple normalization constant to the central object in canonical statistical mechanics. This was achieved by demonstrating its direct connection to the Helmholtz free energy.

Key Takeaways:

  • The Helmholtz free energy, , is the natural thermodynamic potential for systems at constant temperature and volume.
  • The partition function is fundamentally related to the free energy by the master equation: .
  • This relationship provides a complete bridge from the microscopic physics of a system (its energy spectrum, encoded in ) to its macroscopic thermodynamic behavior (encapsulated in ).
  • All thermodynamic observables, such as average energy, entropy, and pressure, can be systematically derived as partial derivatives of , and thus of .

We have now established the full machinery of the canonical ensemble for systems with a fixed number of particles. In our next lesson, we will generalize our framework further to systems that can exchange not only energy but also particles with their environment. This will lead us to the grand canonical ensemble, another powerful tool with its own partition function and corresponding thermodynamic potential.