Course-wide Conventions & Notation
Overview and Learning Objectives¶
Entropy completes the thermodynamic description of spontaneity by accounting for the dispersal of energy and matter. This section motivates entropy through examples where enthalpy alone fails, defines entropy as a state function via reversible heat, and derives the fundamental relation for simple compressible systems.
In Chapter 3, we established the First Law toolkit: internal energy , enthalpy , heat capacities and , and the five-step workflow for computing , , and under various process constraints. That toolkit tells us how much energy is exchanged — but not which direction a process will spontaneously proceed. We will see that exothermicity () often favors spontaneity but does not fully determine it. The missing piece is entropy, a state function that provides crucial insight into the direction of spontaneous change.
In Chapter 2, we built a statistical-mechanical framework in which macroscopic properties emerge as ensemble averages over microstates. Entropy turns out to have a particularly natural microscopic interpretation: it measures how many microstates are consistent with a given macrostate. This section introduces entropy from the macroscopic side; Section 4.3 will close the loop by connecting entropy to the partition function .
Learning objectives:
Explain why exothermicity () does not by itself guarantee spontaneity.
Define entropy as a state function using .
Verify that is exact for an ideal gas by applying the cross-derivative test.
Use the First Law for a reversible -only process to derive .
Compute entropy changes by integrating along a convenient reversible path, including for irreversible processes.
Core Ideas and Derivations¶
Exothermicity and Spontaneity¶
Exothermic reactions are often — but not always — spontaneous. An exothermic process releases heat to its surroundings, corresponding to a negative enthalpy change, . While this heat release can drive a process forward, enthalpy alone does not guarantee spontaneity; we must also consider entropy.
An Example: Formation of Liquid Water¶
Consider the formation of two moles of liquid water from hydrogen and oxygen gases at 298.15 K and 1 bar:
The standard enthalpy change for this reaction is -571.66 kJ for two moles of HO(l), indicating an exothermic process. The reaction releases heat:
In chemical terms, exothermicity is often associated with the formation of stronger chemical bonds in the products than those in the reactants. In this example, forming bonds in water releases more energy than what was required to break and bonds.
It is fortunate that water formation is exothermic, as this makes the reaction more likely to proceed spontaneously under standard conditions.
A Counter Example: Mixing of Two Ideal Gases¶
If we mix two ideal gases, such as Ar and Kr, their intermolecular interactions are negligible (ideal-gas behavior), so . Nonetheless, mixing occurs spontaneously once the partition is removed.
Source
import numpy as np
import matplotlib.pyplot as plt
from scipy.constants import k, eV
from labellines import labelLines
from myst_nb import glue
rng = np.random.default_rng(8251991)
fig, axs = plt.subplot_mosaic([[0, 1]], figsize=(8, 4), constrained_layout=True, sharex=True, sharey=True)
# Before
axs[0].set_title('Before Opening the Stopper')
x_Ar = rng.uniform(-4, 4, 6)
y_Ar = rng.uniform(2, 5, 6)
axs[0].scatter(x_Ar, y_Ar, color='r', label='Ar', s=100)
x_Kr = rng.uniform(-4, 4, 6)
y_Kr = rng.uniform(-5, -2, 6)
axs[0].scatter(x_Kr, y_Kr, color='b', label='Kr', s=100)
# Ar region
axs[0].plot([1, 1], [0, 1], color='k')
axs[0].plot([1, 5], [1, 1], color='k')
axs[0].plot([5, 5], [1, 6], color='k')
axs[0].plot([5, -5], [6, 6], color='k')
axs[0].plot([-5, -5], [6, 1], color='k')
axs[0].plot([-5, -1], [1, 1], color='k')
axs[0].plot([-1, -1], [1, 0], color='k')
# Kr region
axs[0].plot([1, 1], [0, -1], color='k')
axs[0].plot([1, 5], [-1, -1], color='k')
axs[0].plot([5, 5], [-1, -6], color='k')
axs[0].plot([5, -5], [-6, -6], color='k')
axs[0].plot([-5, -5], [-6, -1], color='k')
axs[0].plot([-5, -1], [-1, -1], color='k')
axs[0].plot([-1, -1], [-1, 0], color='k')
# Closed stopper
axs[0].plot([-1.5, 1.5], [0, 0], color='m', lw=2)
axs[0].text(2, 0, "Stopper (closed)", fontsize=10, ha='left', va='center', color='m')
axs[0].set_aspect('equal')
axs[0].axis('off')
# After
axs[1].set_title('After Opening the Stopper')
x_Ar = rng.uniform(-4, 4, 6)
y_Ar_1 = rng.uniform(2, 5, 3)
y_Ar_2 = rng.uniform(-5, -2, 3)
y_Ar = np.concatenate((y_Ar_1, y_Ar_2))
axs[1].scatter(x_Ar, y_Ar, color='r', label='Ar', s=100)
x_Kr = rng.uniform(-4, 4, 6)
y_Kr_1 = rng.uniform(2, 5, 3)
y_Kr_2 = rng.uniform(-5, -2, 3)
y_Kr = np.concatenate((y_Kr_1, y_Kr_2))
axs[1].scatter(x_Kr, y_Kr, color='b', label='Kr', s=100)
axs[1].plot([1, 1], [0, 1], color='k')
axs[1].plot([1, 5], [1, 1], color='k')
axs[1].plot([5, 5], [1, 6], color='k')
axs[1].plot([5, -5], [6, 6], color='k')
axs[1].plot([-5, -5], [6, 1], color='k')
axs[1].plot([-5, -1], [1, 1], color='k')
axs[1].plot([-1, -1], [1, 0], color='k')
axs[1].plot([1, 1], [0, -1], color='k')
axs[1].plot([1, 5], [-1, -1], color='k')
axs[1].plot([5, 5], [-1, -6], color='k')
axs[1].plot([5, -5], [-6, -6], color='k')
axs[1].plot([-5, -5], [-6, -1], color='k')
axs[1].plot([-5, -1], [-1, -1], color='k')
axs[1].plot([-1, -1], [-1, 0], color='k')
# Open stopper
axs[1].plot([-5, -2], [0, 0], color='m', lw=2)
axs[1].text(2, 0, "Stopper (open)", fontsize=10, ha='left', va='center', color='m')
axs[1].axis('off')
axs[1].set_aspect('equal')
axs[1].legend(bbox_to_anchor=(1.05, 1), loc='upper left', borderaxespad=0.)
fig.suptitle(r'$\Delta H = 0$')
plt.show()
plt.close(fig)
Mixing of two ideal gases before and after opening the stopper that separates them.
Even though , the process is still spontaneous. If you were shown the “before” and “after” snapshots without additional labels, you would know the natural direction of mixing. This spontaneous behavior underscores that enthalpy alone cannot capture whether a process will occur without additional driving forces. That driving force is entropy — and we can already anticipate why. From each gas’s perspective, removing the partition is equivalent to a free expansion: the volume accessible to each gas doubles. As we will show below, doubling the available volume at constant temperature increases the entropy by per component. For a symmetric mixture of moles each of Ar and Kr,
The entropy of the mixed state exceeds that of the separated state, so mixing is the spontaneous direction. (We will derive the result in full below; we quote it here to motivate what follows.)
Definition of Entropy¶
- Entropy
- A state function denoted by , quantifying the degree of dispersal or spread of energy and matter, thereby predicting the direction of spontaneous change.
The General Claim¶
In Section 3.1, we noted a key distinction: is an exact differential, while and are inexact — their values depend on the path. We also foreshadowed that “dividing the inexact differential by produces the exact differential .”
It can be shown — via the Clausius theorem (a consequence of the second law) or by identifying as an integrating factor (Appendix A) — that is always an exact differential, regardless of the substance. We therefore define entropy through
The change in entropy between two states and is
Because is exact, depends only on the initial and final states — not on the path. However, computing requires evaluating the integral along a reversible path (since holds only for reversible processes). For an irreversible process between the same two states, we construct any convenient reversible path connecting them and integrate along that path instead.
Entropy is a state function, so between two states is the same regardless of whether the actual process is reversible or irreversible. An irreversible process generates additional entropy (more on this in Section 4.3), but the change in system entropy can always be computed by finding a reversible path between the same endpoints. The system doesn’t “know” which path you use for the calculation — it only knows the initial and final states.
Verification: Ideal Gas¶
Rather than proving the general result, let us verify that is exact for an ideal gas — a case where we can check directly.
From Section 3.2, the First Law for a reversible process with only work, using and as independent variables, gives
For any ideal gas (not just monatomic), and , so
This is inexact: the cross-derivative test gives but .
Now divide by :
Apply the cross-derivative test to and :
Both mixed partials are zero, so they are equal: is exact. Dividing by converted an inexact differential into an exact one, confirming the entropy definition for this case.
The monatomic case
For a monatomic ideal gas specifically, , so
which is manifestly the total differential of . This is an explicit entropy function for the monatomic ideal gas. More general substances have more complicated dependences, but the exactness of still holds.
Fundamental Thermodynamic Relation¶
From the definition of entropy, . For a simple closed system with only work (), the First Law gives
This is the fundamental thermodynamic relation for a simple compressible system:
Notice what has happened: the First Law in the form involves two inexact differentials that combine to give one exact differential. The fundamental relation rewrites the same physics using three exact differentials — , , and . The path-dependent has been replaced by the state-function product , and the path-dependent by . Converting inexact differentials into exact ones is the central mathematical achievement of introducing entropy.
Here, is naturally expressed as a function of the extensive variables and . In systems with additional types of work (e.g., electrical, surface, magnetic), the more general relation becomes
A state function’s natural variables are those that appear as independent variables in its total differential. For internal energy , the natural variables are and for a simple system with only work. Note that while we can always write as a function of other variables (like and ), doing so loses information — the natural-variable form encodes everything about the system’s thermodynamics, while does not. We will return to this point when we introduce free energies later in the course.
Worked Examples¶
Example 1: Isothermal expansion (reversible)¶
Problem. Compute when one mole of an ideal gas expands reversibly and isothermally from to .
Solution. For a reversible isothermal expansion of an ideal gas,
Along a reversible isotherm of an ideal gas, (since depends only on ), so . Therefore
With and :
Result. Doubling the volume reversibly at constant increases the entropy by per mole. This is the result we quoted earlier when computing for ideal-gas mixing.
Example 2: Free expansion (irreversible)¶
Problem. Compute when one mole of an ideal gas undergoes free expansion from to inside a rigid, insulated container (as in the Section 3.1 worked example).
Solution. In the free expansion, , so . The container is insulated, so . By the First Law, , which means for an ideal gas.
But does not mean ! The definition applies to a reversible path, and free expansion is decidedly irreversible. To compute , we need a reversible path connecting the same initial and final states.
The initial and final states have the same but different — exactly the endpoints of Example 1. Since is a state function,
Result. The entropy change is the same as for the reversible isothermal expansion — because entropy is a state function. What differs between the two processes is the entropy of the surroundings: in the reversible case, (the reservoir loses heat at temperature ), so . In the free expansion, (no heat exchanged), so — entropy was produced by the irreversible process.
For an irreversible process, is found by constructing any reversible path between the same endpoints. The actual (irreversible) path enters only when computing and .
Concept Checks¶
In the ideal-gas mixing example, why can but the process still be spontaneous?
Why must be computed along a reversible path even for an irreversible process between the same states?
What are the natural variables of for a simple compressible system, and how do they appear in ?
How does the sign of (system + surroundings) relate to “directionality” (arrow of time) in spontaneous processes?
Two ideal-gas processes connect the same initial and final states: one reversible, one irreversible. Compare , , and for the two processes.
Key Takeaways¶
Spontaneity depends on more than enthalpy; entropy accounts for dispersal and multiplicity of accessible states.
Entropy is defined by and is a state function: its value depends only on the state, not the path.
Dividing by converts an inexact differential into an exact one — this is the central mathematical role of entropy.
For reversible -only processes, is the fundamental thermodynamic relation, expressing the First Law entirely in terms of exact differentials.
Entropy changes for irreversible processes are computed by finding a convenient reversible path between the same initial and final states and integrating along that path.