# 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 being described by internal variables \index{constraint} . This system has a partition function . Consider now a system , such that variables are this time considered as external variables having value . This system has (another) partition function we call . System is obtained from system by constraint relaxing. Here is theorem that binds internal variables of system to partition function of system :

**Theorem:**

Values the most probable in system where are free to fluctuate are the values that make zero the differential of partition function where the 's are fixed.

**Proof:**

Consider the description where the 's are free to fluctuate. Probability for event ,, occurs is:

So

Values the most probable make zero differential (this corresponds to the maximum of a (differentiable) function .). So

**Remark:**

This relation is used in chemistry: it is the fundamental relation of chemical reaction. In this case, the variables represent the numbers of particles of the species and with (the energy of the system) and (the volume of the system). Chemical reaction equation gives a binding on variables that involves stoechiometric coefficients.

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

At thermodynamical equilibrium , so:

**Example:**

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

In general one notes .

**Example:**

Consider the case where variables are the numbers of particles of species . If the particles are independent, energy associated to a state describing the particles (the set of particles of type being in state ) is the sum of the energies associated to states . Thus:

where represents the partition function of the system constituted only by particles of type , for which the value of variable is fixed. So:

**Remark:**

Setting , and with , we have and . 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 . Variables and are free to fluctuate. They have values such that is minimum. let us calculate the differential of :

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

of :

one gets:

If we consider reaction equation:

So:

can only decrease. Spontaneous movement of electrons is done in the sense that implies . As we chose as definition of electrical potential:

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