Skip to main content
Chemistry LibreTexts

4. General Extremum Principles and Thermodynamic Potentials

We have seen that min{\(U(S,\bar{X})\)} and min{\(U(S,\hat{X})\)} imply one another. Under certain conditions, these principles are very convenient. For example,

\[  dS = \dfrac{1}{T} dU - \dfrac{P}{T} dV + \sum \dfrac{\mu_i}{T} dn_i \Rightarrow max \left\{ \sum \dfrac{\mu_i}{T} dn_i \right\}\]

maximizes \(S\) at constant \(U\) and \(V\). 

But what do we do if we are working at constant (T,V) or (T,P)? We then have open systems to deal with, where energy must flow (to keep \(T\) constant), or the volume must change (to keep P constant), etc. This problem arises for many laboratory reactions in chemistry.  As it turns out, if thermodynamic variables other than U and V are held constant, thermodynamic potentials other than entropy or energy of the open system are extremized. (Of course, \(S\) is still maximized for a closed system containing our open system of interest.) Very conveniently, these potentials can be computed just from the properties of the open system of interest alone (e.g. one where \(T\) is constant, and therefore energy must be allowed to flow in and out), and the added assumption that the corresponding variable (e.g. \(T\)) is always constant in the environment. The environment is thus treated as a “bath” or “reservoir” for the intensive variable of interest. That is, we assume the closed system containing our open system of interest is so vast that a change in extensive variable (e.g. \(U\)) of the small open system does not affect the conjugate intensive variable in the environment (e.g. \(T\); the energy deposited or taken from the environments by the open system is too small to change T in the environment).

Our goal: we want potentials where our choice of intensive variable is in the dependent variables. Let’s begin by discussing an apparently obvious way of doing this, which does not work. Let’s say we have the fundamental relation for \(U\), but we want to hold \(T\) constant, not \(S\):

\[ U = U(S,V,n_i) \Rightarrow T=\left( \dfrac{\partial U}{\partial S} \right)_{V,n_i} = T(S,V,n_i)\]

solving for \(S=S(T,V,n_i)\), and insert in \(U\) we seem to be able to get

\[ U =U(T,V,n_i).\]

Now we can hold \(T\) constant. The problem with this: \(T\) is the slope of \(U(S)\), and expressing a function in terms of its own slope leaves the intercept indeterminate: \(U\) is no longer completely defined, and we do not have a fundamental relation to which the laws of thermodynamics can be applied.

We do however want an equation in terms of the slope. The solution is to express the slope \(m\) of \(y(x)\) in terms of the intercept \(\phi\) (or vice-versa). The intercept as a function of slope does contain all the original information about the function \(y(x)\). The process of transforming a function \(y(x)\) into \(\phi(m)\) is called Legendre transform.

Legendre Transforms

Definition: Legendre Transform

The Legendre transform of \(y(x)\) is \(\phi(m)\), the intercept as a function of slope. \(\phi(m)\) and \(y(x)\) are uniquely related as long as \(\dfrac{\partial^2 y}{\partial x^2} \neq 0\) (no inflection point occurs in the original function).

The procedure is given mathematically below, and summarized in the figure above.  Let

\[ m=\dfrac{dy}{dx} = m(x) \Rightarrow x=x(m).\]

If there is no inflection point, \(x\) and \(m\) are uniquely related (but \(y\) can no longer be obtained to better than a shift along the \(y\) axis).  Next we compute

\[ \phi = y(x) -mx = y(x(m)) - mx(m) = \phi(m).\]

This function can be used to obtain the original \(y\):

\[ \dfrac{d\phi}{dm} = \dfrac{dy}{dm} - x -m \dfrac{dx}{dm}\]

\[= \dfrac{dy}{dx}\dfrac{dx}{dm} - m \dfrac{dx}{dm} -x\]

\[= -x(m)\]

This yields \(m(x)\), thus

\[ y(x)=\phi(m(x))+m(x)x\]

Thus we Legendre transform \(U\) (or \(S\)) to new potentials to obtain fundamental relations with different variables. We now consider the most common of these new thermodynamic potentials, which facilitate thermodynamic calculations on open systems with a choice of intensive state functions held constant

4a. The Helmholtz free energy

The Helmholtz free energy \(H = U[S]\) (The square bracket indicates transform \(S \rightarrow T\))

\[ U[S] = A(T,V,n_i) = U -\left(\dfrac{\partial U}{\partial S} \right)_{V,n_i} \cdot S\]

\[ U-TS\)

From this follows

\[ dA =-SdT - PdV + \sum_i \mu_i dn_i.\]

and

\[ \left( \dfrac{\partial A}{\partial T} \right)=-S.\]

When is \(A\) minimized instead of \(U\)? The answer is, at constant \(T\), instead of constant \(S\).

To see this, consider a system open such that its \(T\) is constant (heat flow in or out is allowed as needed quasistatically). Minimizing \(U\) of the total closed system (open system of interest and reservoir at constant \(T\) ), we have

\[ 0 = dU_{tot} = dU +dU_r\]

by Postulate 1

\[= dU + TdS_r\]

with constant \(V_r\) and \(n_r\)

\[=dU - TdS\]

since \( dS_r = -dS_{sys} = \dfrac{dq_r}{T} = \dfrac{dq}{T}\)

\[ = dU - TdS -SdT\]

under the assumed \(dT=0\) conditions

\[ d(U-TS)\]

\[= dA\]

In this equation, the subscript “\(r\)” indicates the reservoir, no subscript indicates the open system of interest. Thus, \(A\) is indeed the function minimized when the total system reaches equilibrium, which means that the open system of interest reaches equilibrium at constant \(T\). Note that \(dA = dU_{tot}\), but can be calculated using only variables of the open system, \(U\), \(T\), and \(S\). In addition,

\[ d^2A =d^2(U+U_r) = d^2U_{tot} > 0\]

at constant \(T\),\(V\),and \(n_i\). Thus, in analogy to the energy of the closed system, \(A\) is minimized in a system at constant temperature (in contact with a heat reservoir). This is also referred to a system coupled to a thermostat.

Consider a simple application of the Helmholtz free energy, proving that pressure is equalized between two subsystems separated by a flexible wall.  For two systems coupled by movable impermeable membrane at constant \(T\) at equilibrium:

\[dA = 0 = -S_1dT - P_1dV_1 + \sum_i \mu_{i1}dn_{i1} - S_2dT - P_2dV_2 + \sum_i \mu_{i2} n_{i2}\]

Because \(T\) is constant and the wall is impermeable, only the pressure terms are nonzero, and since \(dA = 0\) at equilibrium,

\[ 0 = (P_1-P_2) dV_2\]

because \(dV_1 = dV_2\)

\[ \Rightarrow P_1 = P_2\]

Pressure is the quantity equalized between two systems separated by a moveable membrane. We already proved this earlier in the entropy representation, but the proof is a little shorter in the Helmholtz representation because temperature is already taken care of.

4b. The Enthalpy

we transform \(V \rightarrow P\)

\[ U[V= H(S,P,n_i) = U - \left(\dfrac{\partial U}{\partial V}\right)_{S,n_j} V\]

\[ = U+PV\]

From this follows, using the Gibbs-Duhem relation,

\[ dH = TdS+ VdP + \sum_i \mu_i dn_i \]

therefore

\[\left(\dfrac{\partial H}{\partial P}\right)_{S,n_j} = V\]

When a system is at constant \(P\), then \(0 = dU_{tot}= dH\). Again, unlike \(dU_{tot}\), \(dH\) can be calculated using only system parameters.

As an example, consider a simple system at constant \(P\) and vanishing \(\sum_i \mu_i dn_i\) (no mass flow). It then follows that \(dH=Tds = dq\) if the reaction is done quasistatically. Thus the enthalpy is the heat release of a quasistatic reaction at constant pressure, just like the energy is the heat release when the volume is held constant. Because many reactions run at constant pressure and do not exchange particles with the environment, this is very useful for calculating heat exchange.

4c. The Gibbs Free Energy

For the Gibbs free energy we transform twice for a system coupled to a thermostat and pressurestat (i.e., constant temperature and pressure):

  • \(S \rightarrow T\),
  • \(V \rightarrow P\)

\[U[S,V] =H[S] =A[V] = G[T,P,n_i) = H-TS = A+PV = U-TS-PV\]

From this and the Gibbs-Duhem relation follows

\[ dG = -sdT + VdP + \sum_i \mu_i dn_i\]

as well as

\[ \left( \dfrac{\partial G}{\partial T} \right)_{P,n_i} = -S\]

\[\left(\dfrac{\partial G}{\partial P} \right)_{T,n_i} = V\]

\[ G= \sum_i \mu_in_i\]

for simple multi-component systems. Again, a derivation analogous to a) shows that \(dG = dU_{tot} = 0\) is minimized in a system in contact with heat and pressure reservoirs, i.e. \(T\),\(P\) constant.

  • Example: For a one-component system, \(G = \mu n\), so \(\mu\) is the chemical potential
  • Example: pressure and concentration dependence of the chemical potential, also called the molar free energy. Using the Gibbs-Duhem relation,

\[ nd\mu = SdT + vdP =VdP\]

at constant \(T\)

\[ \Rightarrow n \int_a^b d\mu = \int_a^b VdP = \int_a^b \dfrac{nRT}{P} dP = NRT \ln \dfrac{P_b}{P_a} = n(\mu_b-\mu_a)\]

for an ideal gas

\[ \Rightarrow \mu = \mu_P^{(0)} + RT \ln P\]

if the reference pressure is set to unity (\(P_o=1\) usually in units of atmospheres.

Because \(c=\dfrac{n}{V}=\dfrac{P}{RT}\) for an ideal gas, therefore \(\mu = \mu_c^{(0)} + RT\ln c\) if \(c_o=1\) usually in units of \(\dfrac{moles}{liter}\).

This kind of equation for the chemical potential can also hold approximately in dilute solutions. If \(c_i\) in moles/liter is used for the concentration of non-interacting component “i.”  The reason is that dilute solutes are screened from one another by the solvent, and effectively move like random gas particles.  For \(n_i\) moles of a solute, we can write

\[ n_i\mu_i = n_i\mu_i^0+n_iRT\ln c_i = n_i\mu_i^0 + RT\ln \{c_i^{n_i}\}\]

In reality, the chemical potential does not scale exactly as \(\ln P\) because of interactions among particles, especially in solution, where screening is not perfect, or solvent molecules can interact strongly with solutes (e.g. H-bonding in an aqueous sugar solution). In that case we can correct the chemical potential:

\[ \mu = \mu_i^{(-)} + RT\ln c_i + \Delta\mu_i^{corr}.\]

Letting \(\gamma\) be the activity coefficient

\[\gamma_i(\vec{c},T) \equiv e^{\Delta \mu_{corr}}{RT}\]

\[ \Rightarrow \mu_i = \mu_i^0 + RT\ln(\gamma_i c_i)\]

\(\gamma\) is often used in tabulations and measures the deviation from the ideal non-interacting particle model. 

Finally we note the relation between the temperature derivatives of chemical potential and free energy, which yield the concentration dependence of the entropy:

\[ \left( \dfrac{\partial \mu}{d\partial T} \right)_P=\dfrac{1}{n} \left(\dfrac{\partial G}{\partial T}\right)_P = -\dfrac{S}{n} = -S\]

\[ \Rightarrow -S = \left( \dfrac{\partial \mu^{(0)}}{\partial T} \right)_P + RT \ln c\]

As concentration (or pressure) increases, and particles become more confined, entropy decreases.

4d. Massieu functions

The Massieu functions are the Legendre transforms of the entropy.  For example, \(S[U,V,n]\) is a function of \(T\), \(P\) and \(n\) just like the Gibbs free energy. The Massieu functions are closely related to the partition functions of statistical mechanics. For example, \(S\) yields the microcanonical partition function (when \(U\) is constant). Transforming \(S[U]\) we can obtain the canonical partition function, which is a function of \(T\). Let us consider these two in some detail.

From \(S\) itself, which is maximized at constant energy \(U\), we obtain the number of microstates populated at constant energy,

\[ W_u (U)= e^{S/k_B}.\]

This is also known as the microcanonical partition function. Now consider the Legendre transform

 \[ S[U] =f(T) = S-\dfrac{1}{T}U\]

since \(S = (1/T) U + (P/T) V – (\mu/T)n\) for a simple system. The number of microstates at energy U populated at constant temperature is

\[W_T =e^{(S-U/T)/k_B} = e^{S/k_B}e^{-U/k_BT}=W(U)e^{-U/k_BT}.\]

The probability of the system having energy \(E_i = U\) out of all possible energies is given by

\[ p_i= \dfrac{W(E_i)e^{-E_i/k_BT}}{\sum W(E_i)e^{-E_i/k_BT}} =\dfrac{1}{Q} W(E_i)e^{-E_i/k_BT}\]

\(Q\) is the canonical partition function, or the effective number of microstates populated at temperature \(T\). For states of very high energy \(E_i\), the Boltzmann factor \(e^{-E/k_BT}\) is very small, and their microstates counted by \(W(E_i)\) do not contribute significantly to the sum of states.