A constraint equation between two systems in thermodynamic equilibrium

In several introductory statistical mechanics books/notes I have seen, the idea of equilibrium is introduced by asserting the existence of a constraint equation between the properties of two systems, A and B, usually stated as

$$f_{AB}(A_1,A_2,...;C_1,C_2,...)=0 \tag{1}.$$

I'm a little confused on two points. Firstly, is there a reason this equals specifically zero? Or would it be equally valid to have some constant there? In other words is the point of this equation to show that equilibrium implies some of the properties are "unchanging", or to show that the properties of the two systems "cancel out" in some way mathematically? And secondly I'm unclear on what exactly the variables $$A_1,A_2,...,C_1,C_2,...$$ could be, are they macroscopic properties like pressure and volume? Or are they microscopic properties like the positions and momenta of the systems' particles?

Any equation can be written as a function equal to zero - it is just the matter of little algebra to move all the terms to one side of the equation. It sometimes make it less transparent for a physicist, but it is a standard mathematical convention, and for a good reason.

When two bodies are in equilibrium with each other, it often means that they have same temperatures and same chemical potentials, which can be written as $$T_1 - T_2 = 0,\\ \mu_1 - \mu_2=0.$$ For specific situations one may add other quantities, such as pressure. Sometimes instead of simple quantities one will have more complex expressions, but the meaning is the same. The first chapters of statistical mechanics textbooks are usually full of examples.

• So the purpose of the constraint equation in the question is to show that there is some quantity common to both systems that is a function of both of their macroscopic variables? Commented Jul 1, 2020 at 13:07
• I do not really understand your sentence... The purpose of the constraint is to show that the two systems are not independent. The specific nature of the constraint is then determined by the requirement that they are two parts of a single equilibrium system. Commented Jul 1, 2020 at 13:13
• Ahh I see that answers my question, thank you. Commented Jul 1, 2020 at 14:11

We can always define $$f$$ so that the constraint is zero. If we start with a constraint $$g_{AB}(A_i; C_i) = X$$, just define $$f_{AB}(A_i; C_i) = g_{AB}(A_i; C_i) - X$$. The point is that there's some conservation law at work.

In the kind of situation stat mech textbooks usually think about, $$A_i, C_i$$ will be macroscopic quantities. However, that doesn't need to be true. For example, a gas of noninteracting free particles satisfies $$\prod_i (p_i(t) - p_i(0))^2 = 0$$

• So in the case that $A_i, C_i$ are macroscopic quantities rather than, say, momentum as you've shown, what conservation law is being highlighted by the constraint equation? Commented Jul 1, 2020 at 13:08
• You can write a constraint equation in this form for any conservation law. A typical case is defining $f_{AB}(E_A,E_B) = E_A + E_B - E_{total}$, so that $f_{AB} = 0$ is a way of saying "total energy is conserved." Commented Jul 1, 2020 at 18:56
• Also, for what it's worth, Vadim's answer is genuinely different from mine. I assumed your book is talking about an equation which is true at all times, so that it constrains the dynamics of the system. Vadim is talking about an equation which defines equilibrium (but may not be true initially). You can probably figure out which answer applies to your question by taking another look at your textbook. Commented Jul 1, 2020 at 19:00
• I see, thank you for your help Commented Jul 1, 2020 at 19:15