# 23.5: Chemical Potential Can be Evaluated From a Partition Function

Let's do a bit of chemistry and consider a chemical reaction that transforms one pure compound into the other. We'll assume they do not mix. Consider the change in Gibbs free energy when a bit of compound one is reacted to form an identical amount of compound two in moles, i.e. $$dn_1= -dn_2$$ :

$dG = -SdT + VdP +μ_1dn_1+μ_2dn_2$

If the reaction is done in an electrochemical cell at constant pressure and temperature, we get:

$dG = \cancel{-SdT} + \cancel{VdP} +μ_1dn_1+μ_2dn_2 +ℰde$

At equilibrium $$dG=0$$, this gives:

$0 =μ_1dn_1-μ_2dn_1 +ℰde$

$[μ_2-μ_1]dn=ℰde$

$Δμ= \left( \dfrac{de}{dn} \right) ℰ$

The factor de/dn is determined by the stoichiometric coefficients of the electrochemical reaction (the number of electrons involved in the balanced reaction). It has a dimension Coulomb/mole. Clearly the open cell voltage (the electromotive force ℰ) of the cell is directly related to the difference in thermodynamic potentials between reactants and products. Notice that the righthand side has dimensions [Coulomb*Volt/mole]. This indeed equals the [Joules/mole] on the left

As you can see the term thermodynamic potential gives you what work the system can potentially do and electrical potentials are a closely related quantity.

We have treated the reactant and the product as two pure compounds here and that is a bit of a fib. In reality we are usually dealing with mixtures (solutions in which one species replaces the other e.g.). In such cases μ is a function of the composition of the mixture and therefore so is ℰ. We will need to consider the thermodynamics of mixtures.