The Fundamental Equations of Thermodynamics
Imagine squeezing a gas in a cylinder while heat leaks in, or letting a reaction release heat while gas expands against the atmosphere. Tracking energy through these simultaneous changes looks messy until you realize four equations do all the bookkeeping at once. These are the fundamental equations of thermodynamics, combining the first and second laws into single differential statements for , , , and . They matter because every equilibrium condition, every phase rule, every van 't Hoff or Clausius–Clapeyron relation traces back to these four lines. Once you see how they arise, the rest of chemical thermodynamics becomes bookkeeping rather than mystery. This article derives all four equations from the first and second laws. You will see why each one has its own natural variables. Two fully worked numerical examples follow. The article closes by pointing toward Maxwell relations, which fall out of these equations almost for free.
- The four fundamental equations combine with the definitions of , , and .
- Each equation pairs a state function with its own natural variables: , , , .
- They apply to closed systems doing only work, in either reversible or irreversible processes.
- Because each is an exact differential, the coefficients give exact partial-derivative identities.
- These four equations are the parent equations from which Maxwell's relations and all equilibrium criteria descend.
- Key idea: combining with , , generates four equivalent, exact statements of the combined first and second laws, each naturally expressed in a different pair of variables.
All chemical thermodynamics reduces to one master statement, for reversible -work only closed systems, restated through Legendre transformations as , , and so that each state function is naturally controlled by the variables actually held fixed in the laboratory: entropy and volume for , entropy and pressure for , temperature and volume for , temperature and pressure for .
The physical picture
Start with a closed system, meaning no matter crosses its boundary, doing only expansion work against pressure . The first law states
For a reversible change, , and the second law defines entropy through . Substituting both into the first law gives the fundamental equation
This single line is remarkable: it contains no path-dependent quantities. Both and individually depend on the path taken, but their combination does not. Because is expressed entirely in the state functions , , , and , the equation holds for any change between two neighboring equilibrium states of the closed system, reversible or not — the derivation used a reversible path only as a bookkeeping device to evaluate the exact differential. The other three thermodynamic potentials are defined from by adding or subtracting a or term — a mathematical trick called a Legendre transformation. Each transformation swaps one natural variable for its conjugate:
- swaps for
- swaps for
- swaps both
Differentiating each definition and substituting produces the other three fundamental equations, derived explicitly below. The payoff is that each potential is simplest — meaning its differential has the fewest terms — when expressed in its own natural variables, and those natural variables are exactly the ones easiest to control experimentally: constant for ; constant for ; constant for ; constant for , the last being the everyday condition of a beaker open to the lab bench.
The core relations
where: is internal energy, natural variables (entropy) and (volume); valid for closed, -work-only systems.
where: is enthalpy, natural variables and (pressure).
where: is Helmholtz energy, natural variables (temperature) and .
where: is Gibbs energy, natural variables and .
Goal. Starting from , derive the other three fundamental equations by differentiating the defining relations for , , and .
Step 1 — establish dU. For a closed system with reversible work, the first law becomes . The second law defines for a reversible step, so . Substitution gives
Because , , , , are all state functions, this equation is an exact differential relation that holds for any infinitesimal change connecting equilibrium states — irreversible paths included — even though it was derived using a reversible path.
Step 2 — derive dH. Enthalpy is defined as . Take the total differential using the product rule:
Substitute from Step 1:
The and terms cancel exactly, leaving
This confirms 's natural variables are and : at constant entropy and pressure, , and more usefully, at constant pressure , recovering the familiar rule that enthalpy change equals heat at constant pressure.
Step 3 — derive dA. Helmholtz energy is defined as . Differentiate:
Substitute :
The two terms cancel:
's natural variables are and . At constant temperature, , so measures the maximum non-expansion... actually here purely work extractable at constant , motivating its role as the criterion for spontaneity in rigid, isothermal systems.
Step 4 — derive dG. Gibbs energy is defined as , or equivalently . Differentiate:
Substitute from Step 2:
The terms cancel:
's natural variables are and — precisely the variables fixed in an open beaker on a lab bench. At constant temperature and pressure, reduces to zero at equilibrium and is negative for any spontaneous process, which is why dominates practical chemical thermodynamics.
Boxed result.
All four follow from one master equation plus three definitions; none contains new physics beyond the first and second laws.
Worked examples
Example 1 — Foundational: reversible isothermal expansion of an ideal gas One mole of an ideal gas expands reversibly and isothermally at from to . Find , , , and integrated over the process, using the fundamental equations as a consistency check. Step 1: entropy change. For an ideal gas at constant ,
Step 2: check via the fundamental equation. For an ideal gas, depends only on , so at constant , . Verify this is consistent with integrated along the isothermal path:
Since exactly (because was itself computed from that integral), the two terms cancel:
This confirms internal consistency: , as required for an isothermal ideal-gas process. Step 3: . Since for an ideal gas, also depends only on , so . Check via : at constant , is constant, so , giving
consistent with Step 2. Step 4: . Using , at constant , :
Step 5: . Using , at constant :
(since = constant, )
Sanity check: , matching within rounding. Also here because for an isothermal ideal-gas process, consistent with .
Example 2 — Applied: pressure dependence of Gibbs energy across a phase-like compression Liquid water ( at 298 K, essentially incompressible over this range) is compressed reversibly and isothermally from to at . Use to find , and compare the relative contributions that would arise from a hypothetical entropy change to show why the term dominates for condensed phases. Step 1: apply dG at constant T. Since is constant, , so
Because liquid water is nearly incompressible, is treated as constant over this pressure range:
Step 2: numbers. Convert to SI: . Pressure change:
Step 3: compare with a typical thermal contribution. Consider that raising the temperature by just at constant changes by . Using :
Step 4: interpretation. A 100-bar compression changes by , comparable in magnitude to a – temperature change, even though 100 bar sounds like an enormous pressure change and is chemically a mild one. This illustrates why liquids and solids are called "pressure-insensitive": their small molar volumes make the term in small unless pressure changes are extreme (hundreds to thousands of bar), in sharp contrast to gases, where is roughly 2000 times larger at 1 bar and the same produces enormous . Sanity check: the sign is positive, correctly reflecting that compression at constant raises Gibbs energy (work is done on the system, and means increasing increases ), consistent with .
Limiting cases & common traps
| Situation | What happens | Why |
|---|---|---|
| Constant | at equilibrium | 's natural variables held fixed |
| Constant | at equilibrium | 's natural variables held fixed |
| Constant | for spontaneous change | maximum work criterion |
| Constant | for spontaneous change | everyday lab condition |
| Ideal gas, isothermal | depend on only |
- These equations assume a closed system (no mass exchange) doing only reversible work; adding non-expansion work or open-system mass flow adds extra terms.
- The equations hold for irreversible changes too, since , , , are state functions — only the derivation used a reversible path.
- Don't confuse (a general, exact relation) with (valid only at constant ).
The chemist behind it
Josiah Willard Gibbs, working largely alone at Yale in the 1870s, unified mechanics and thermodynamics into a single mathematical framework built on exactly this kind of potential function. His 300-page memoir "On the Equilibrium of Heterogeneous Substances" (1876–1878) introduced the free energy that bears his name and derived the equilibrium and phase-rule consequences of decades before most chemists had the mathematical tools to appreciate it. Wilhelm Ostwald's German translation later helped the ideas spread through European chemistry.
Origins · 1 minJosiah Willard Gibbs and how this was discovered
Ask the tutor: How do the exactness conditions on these four equations generate the four Maxwell relations?
Why do we need four different potentials instead of just using U everywhere
Because U's natural variables are S and V, which are inconvenient to control in a lab. Chemists usually fix temperature and pressure, not entropy and volume. H, A, and G are Legendre transforms of U built precisely so that each is naturally expressed in a more convenient variable pair. G, with variables T and p, matches everyday bench conditions, which is why it appears so often in equilibrium and reaction thermodynamics.
Does dG = −SdT + Vdp mean G always decreases with temperature
Yes, at constant pressure, since and entropy is always positive for any substance with positive absolute temperature. So increasing at fixed always lowers , and the rate of decrease is steeper for phases with larger entropy, such as gases compared to liquids or solids.
How do these four equations lead to Maxwell's relations
Each fundamental equation is an exact differential of the form . Exactness requires the mixed second partial derivatives of to be equal regardless of order, which forces a cross-relation between and . Applying this test to , , , and in turn generates the four Maxwell relations, a topic that follows directly from what is derived here.
What changes if the system does non-expansion work, like electrical work
An extra term appears in every equation. For example, , and correspondingly at constant . This is the basis for relating to the maximum non-expansion work obtainable, such as in electrochemical cells where .
Why does ΔA equal ΔG for the isothermal ideal gas expansion in Example 1
Because , so . For an ideal gas at constant temperature, is constant, so and exactly. This equality is special to isothermal ideal-gas processes and does not hold generally.