Gibbs–Duhem equation
In thermodynamics, the Gibbs–Duhem equation describes the relationship between changes in chemical potential for components in a thermodynamic system: where formula_2 is the number of moles of component formula_3 the infinitesimal increase in chemical potential for this component, formula_4 the entropy, formula_5 the absolute temperature, formula_6 volume and formula_7 the pressure. formula_8 is the number of different components in the system. This equation shows that in thermodynamics intensive properties are not independent but related, making it a mathematical statement of the state postulate. When pressure and temperature are variable, only formula_9 of formula_8 components have independent  values for chemical potential and Gibbs' phase rule follows. The Gibbs−Duhem equation cannot be used for small thermodynamic systems due to the influence of surface effects and other microscopic phenomena. The equation is named after Josiah Willard Gibbs and Pierre Duhem. Derivation. Deriving the Gibbs–Duhem equation from the fundamental thermodynamic equation is straightforward. The total differential of the extensive Gibbs free energy formula_11 in terms of its natural variables is Since the Gibbs free energy is the Legendre transformation of the internal energy, the derivatives can be replaced by their definitions, transforming the above equation into: The chemical  potential is simply another name for the partial molar Gibbs free energy (or the partial Gibbs free energy, depending on whether N is in units of moles or particles). Thus the Gibbs free energy of a system can be calculated by collecting moles together carefully at a specified T, P and at a constant molar ratio composition (so that the chemical potential doesn't change as the moles are added together), i.e. The total differential of this expression is Combining the two expressions for the total differential of the Gibbs free energy gives which simplifies to the Gibbs–Duhem relation : Alternative derivation. Another way of deriving the Gibbs-Duhem equation can be found be taking the extensivity of energy into account. Extensivity implies that where formula_19 denotes all extensive variables of the internal energy formula_20. The internal energy is thus a first-order homogenous function. Applying Euler's homogeneous function theorem, one finds the following relation when taking only volume, number of particles, and entropy as extensive variables: Taking the total differential, one finds Finally, one can equate this expression to the definition of formula_23 to find the Gibbs-Duhem equation Applications. By normalizing the above equation by the extent  of a system, such as the total number of moles, the Gibbs–Duhem equation provides a relationship between the intensive variables of the system. For a simple system with formula_8 different components, there will be formula_26 independent parameters or "degrees of freedom". For example, if we know a gas cylinder filled with pure nitrogen is at room temperature (298 K) and 25 MPa, we can determine the fluid density (258 kg/m), enthalpy (272 kJ/kg), entropy (5.07 kJ/kg⋅K) or any other intensive thermodynamic variable. If instead the cylinder contains a nitrogen/oxygen mixture, we require an additional piece  of information, usually the ratio of oxygen-to-nitrogen. If multiple phases of matter are present, the chemical potentials across a phase boundary are equal. Combining expressions for the Gibbs–Duhem equation in each phase and assuming systematic equilibrium (i.e. that the temperature and pressure is constant throughout the system), we recover the Gibbs' phase rule. One particularly useful expression arises when considering binary solutions. At constant P (isobaric) and T (isothermal) it becomes: or, normalizing by total number of moles in the system formula_28 substituting in the definition of activity coefficient formula_29 and using the identity formula_30: This equation  is instrumental in the calculation of thermodynamically consistent and thus more accurate expressions for the vapor pressure of a fluid mixture from limited experimental data. Ternary and multicomponent solutions and mixtures. Lawrence Stamper Darken has shown that the Gibbs-Duhem equation can be applied to the determination of chemical potentials of components from a multicomponent system from experimental data regarding the chemical potential formula_32 of only one component (here component 2) at all compositions. He has deduced the following relation x, amount (mole) fractions of components. Making some rearrangements and dividing by (1 – x) gives: or or The derivative with  respect to one mole fraction x is taken at constant ratios of amounts (and therefore of mole fractions) of the other components of the solution representable in a diagram like ternary plot. The last equality can be integrated from formula_37 to formula_38 gives: Applying LHopital's rule gives: This becomes further: Express the mole fractions of component 1 and 3 as functions of component 2 mole fraction and binary mole ratios: and the sum of partial molar quantities gives formula_46 and formula_47 are constants which can be determined from the binary systems 1_2 and 2_3. These constants can be obtained  from the previous equality by putting the complementary mole fraction x = 0 for x and vice versa. Thus and The final expression is given by substitution of these constants into the previous equation: