The Gibbs free energy G is defined as
or, what amounts to the same thing,
As when we first defined enthalpy, this doesn't seem to mean much until we write it in differential form:
\[d G=d H-T d S-S d T\]
\[d G=d A+P d V+V d P.\]
Then, either from equations 12.1.5 (dH = TdS + VdP + ∑XdY) and 12.5.3 or from equation 12.4.3 (dA = −SdT − PdV + ∑XdY) and 12.5.4, we obtain
\[d G=-S d T+V d P+\sum X d Y\]
That is to say that, if the temperature and pressure are constant, the increase in the Gibbs function of a system is equal to the reversible work (other than PdV work of compression) done on it. Conversely, if the temperature and pressure are held constant, and a machine is used to do external work (which may include but is not limited to PdV work of expansion), the Gibbs function decreases by the amount of reversible (i.e.useful) work done by the machine other than the PdV work of expansion.