# Introduction to Mathematical Physics/Statistical physics/Constraint relaxing

We have defined at section secmaxient external variables, fixed by the exterior, and internal variables free to fluctuate around a fixed mean. Consider a system ${\displaystyle L}$ being described by ${\displaystyle N+N'}$ internal variables \index{constraint} ${\displaystyle n_{1},\dots ,n_{N},X_{1},\dots ,X_{N'}}$. This system has a partition function ${\displaystyle Z^{L}}$. Consider now a system ${\displaystyle F}$, such that variables ${\displaystyle n_{i}}$are this time considered as external variables having value ${\displaystyle N_{i}}$. This system ${\displaystyle F}$ has (another) partition function we call ${\displaystyle Z^{F}}$. System ${\displaystyle L}$ is obtained from system ${\displaystyle F}$ by constraint relaxing. Here is theorem that binds internal variables ${\displaystyle n_{i}}$ of system ${\displaystyle L}$ to partition function ${\displaystyle Z^{F}}$ of system ${\displaystyle F}$ :

Theorem:

Values ${\displaystyle n_{i}}$ the most probable in system ${\displaystyle L}$ where ${\displaystyle n_{i}}$ are free to fluctuate are the values that make zero the differential of partition function ${\displaystyle Z^{F}}$ where the ${\displaystyle n_{i}}$'s are fixed.

Proof:

Consider the description where the ${\displaystyle n_{i}}$'s are free to fluctuate. Probability for event ${\displaystyle n_{1}=N_{1}}$,${\displaystyle \cdots }$,${\displaystyle n_{N}=N_{N}}$ occurs is:

${\displaystyle P(n_{1}=N_{1},\cdots ,n_{N}=N_{N})=\sum _{(l)/n_{1}=N_{1},\cdots ,n_{N}=N_{N}}P_{l}^{L}}$

So

${\displaystyle {\begin{matrix}P(n_{1}=N_{1},\cdots ,n_{N}=N_{N})=\\&&{\frac {1}{Z^{nl}}}e^{-\lambda _{n_{1}}N_{1}-\cdots -\lambda _{n_{N}}N_{N}}\sum _{(l)/n_{1}=N_{1},\cdots ,n_{N}=N_{N}}e^{-\lambda _{X_{1}}{\bar {X}}_{1}-\lambda _{X_{2}}{\bar {X}}_{2}}\end{matrix}}}$

Values the most probable make zero differential ${\displaystyle dP(n_{1}=N_{1},\cdots ,n_{N}=N_{N})}$ (this corresponds to the maximum of a (differentiable) function ${\displaystyle P}$.). So

${\displaystyle d\log(Z^{F})=\sum _{i}{\frac {\partial \log(Z^{F})}{\partial n_{i}}}dn_{i}=0}$

Remark:

This relation is used in chemistry: it is the fundamental relation of chemical reaction. In this case, the ${\displaystyle N}$ variables ${\displaystyle n_{i}}$ represent the numbers of particles of the ${\displaystyle N}$ species ${\displaystyle i}$ and ${\displaystyle N'=2}$ with ${\displaystyle X_{1}=E}$ (the energy of the system) and ${\displaystyle X_{2}=V}$ (the volume of the system). Chemical reaction equation gives a binding on variables ${\displaystyle n_{i}}$ that involves stoechiometric coefficients.

Let us write a Gibbs-Duheim type relation \index{Gibbs-Duheim relation}:

${\displaystyle S^{F}/k=\lambda _{X_{1}}{\bar {X}}_{1}+\lambda _{X_{2}}{\bar {X}}_{2}+\ln(Z^{F})}$
${\displaystyle S^{L}/k=\lambda _{X_{1}}{\bar {X}}_{1}+\lambda _{X_{2}}{\bar {X}}_{2}+\lambda _{n_{1}}{\bar {n_{1}}}+\cdots +\ln(Z^{L})}$

At thermodynamical equilibrium ${\displaystyle S^{F}=S^{L}}$, so:

${\displaystyle \lambda _{n_{i}}={\frac {\partial \ln(Z^{F})}{\partial n_{i}}}}$

Example:

This last equality provides a way to calculate the chemical potential of the system.\index{chemical potential}

${\displaystyle \mu _{i}={\frac {\partial \ln(Z^{F})}{\partial n_{i}}}}$

In general one notes ${\displaystyle -\ln(Z^{F})=G}$.

Example:

Consider the case where variables ${\displaystyle n_{i}}$ are the numbers of particles of species ${\displaystyle i}$. If the particles are independent, energy associated to a state describing the ${\displaystyle N}$ particles (the set of particles of type ${\displaystyle i}$ being in state ${\displaystyle l_{i}}$) is the sum of the ${\displaystyle N}$ energies associated to states ${\displaystyle l_{i}}$. Thus:

${\displaystyle \ln Z^{F}(\lambda _{X_{1}},\lambda _{X_{2}},n_{1},n_{2})=\ln Z_{1}^{F}(\lambda _{X_{1}},\lambda _{X_{2}},n_{1})+\dots +\ln Z_{N}^{F}(\lambda _{X_{1}},\lambda _{X_{2}},n_{N})}$

where ${\displaystyle Z_{i}^{F}(\lambda _{X_{1}},\lambda _{X_{2}},n_{i})}$ represents the partition function of the system constituted only by particles of type ${\displaystyle i}$, for which the value of variable ${\displaystyle n_{i}}$ is fixed. So:

${\displaystyle {\frac {\partial \ln Z_{1}^{F}}{\partial n_{1}}}dn_{1}+\dots +{\frac {\partial \ln Z_{N}^{F}}{\partial n_{N}}}dn_{N}=0}$

Remark:

Setting ${\displaystyle \lambda _{1}=\beta }$,${\displaystyle \lambda _{2}=\beta p}$ and ${\displaystyle \lambda _{n_{1}}=-\beta \mu }$ with ${\displaystyle G=-k_{B}T\ln Z^{nf}}$, we have ${\displaystyle G(T,p,n)=E+pV-TS}$ and ${\displaystyle G'(T,p,\mu )=E+pV-TS-\mu -{n_{1}}}$. This is a Gibbs-Duheim relation.

Example:

We propose here to prove the Nernst formula\index{Nernst formula} describing an oxydo-reduction reaction.\index{oxydo-reduction} This type of chemical reaction can be tackled using previous formalism. Let us precise notations in a particular case. Nernst formula demonstration that we present here is different form those classically presented in chemistry books. Electrons undergo a potential energy variation going from solution potential to metal potential. This energy variation can be seen as the work got by the system or as the internal energy variation of the system, depending on the considered system is the set of the electrons or the set of the electrons as well as the solution and the metal. The chosen system is here the second. Consider the free enthalpy function ${\displaystyle G(T,p,n_{i},E_{p})}$. Variables ${\displaystyle n_{i}}$ and ${\displaystyle E_{p}}$ are free to fluctuate. They have values such that ${\displaystyle G}$ is minimum. let us calculate the differential of ${\displaystyle G}$:

${\displaystyle dG(T,p,n_{i},E_{p})={\frac {\partial G}{\partial T}}dT+{\frac {\partial G}{\partial p}}dp+\sum _{i}{\frac {\partial G}{\partial n_{i}}}dn_{i}+{\frac {\partial G}{\partial E_{p}}}dE_{p}}$

Using definition\footnote{the internal energy ${\displaystyle U}$ is the sum of the kinetic energy and the potential energy, so as ${\displaystyle G}$ can be written itself as a sum:

${\displaystyle G=U+pV-TS}$
}

of ${\displaystyle G}$:

${\displaystyle {\frac {\partial G}{\partial E_{p}}}=1}$

one gets:

${\displaystyle 0=\sum _{i}\mu _{i}dn_{i}+dE_{p}}$

If we consider reaction equation:

${\displaystyle Ox+n{\bar {e}}\longrightarrow Red}$
${\displaystyle 0=\sum _{i}\mu _{i}\nu _{i}d\xi +nq(V_{red}-V_{ox})}$

So:

${\displaystyle V_{red}-V_{ox}={\frac {\sum _{i}\nu _{i}\mu _{i}}{nF}}}$

${\displaystyle dG}$ can only decrease. Spontaneous movement of electrons is done in the sense that implies ${\displaystyle dE_{p}<0}$. As ${\displaystyle dE_{p}^{ext}=-dE_{p}^{int}}$ we chose as definition of electrical potential:

${\displaystyle V^{ext}=-V^{int}}$

Nernst formula deals with the electrical potential seen by the exterior.