Where does the relative sign come from in this chain rule application?

I'm studying thermodynamics I came across this definition

$$p = \left( \frac{\partial u}{\partial x} \right)_{S}$$

where $p$ is a generalised pressure, $u$ is the energy of the system, $x$ is an extensive parameter and $S$ is the entropy. I know this page is not about physics but neither is my doubt, which is:

The text then proceeds to write this pressure in terms of a derivative of entropy and apply to it the chain rule

$$p=\left( \frac{\partial u}{\partial x} \right)_{S}=-\left( \frac{\partial u}{\partial S} \right)_{x}\left( \frac{\partial S}{\partial x} \right)_{u}$$

Where does the minus sign come from? What is the rule here? If I was asked to write this pressure I would apply the chain rule without the minus sign, so what am I missing here?

Thank you very much.

• I greatly suspect that negative comes from the $minus one$ rule for differentials, that is $\frac{dy}{dx}\frac{dx}{dz}\frac{dz}{dy}=-1$. It's in my calculus textbook for engineers, but unfortunately not in English. But this is the direction where you have to look into, therefore my answer as a mere comment... – imranfat May 16 '17 at 0:38
• I will look into it. Thank you very much. – Gabu May 16 '17 at 0:40

Yes, thermodynamics people like to call this the cyclic rule for thermodynamics. If you have three variables, say, $x,u,S$, related by some functional equation $f(x,u,S)=0$, then the result is that $$\left(\frac{\partial u}{\partial x}\right)_S \left(\frac{\partial S}{\partial u}\right)_x \left(\frac{\partial x}{\partial S}\right)_u = -1,$$ along with the rule that $$\left(\frac{\partial u}{\partial x}\right)_S \left(\frac{\partial x}{\partial u}\right)_S = 1$$ (in the latter you're back to the usual single-variable calculus result that inverse functions have inverse derivatives, since $S$ is held constant in both).
To see where the surprising $-1$ comes from, say that $f(x,u,S)=0$ defines $x$ implicitly as a function of $u$ and $S$, and differentiate implicitly with respect to $u$ (fixing $S$, of course) to get that $$\frac{\partial f}{\partial x}\left(\frac{\partial x}{\partial u} \right)_S+ \frac{\partial f}{\partial u} = 0, \quad\text{and so}\quad \left(\frac{\partial x}{\partial u}\right)_S = -\frac{\frac{\partial f}{\partial u}}{\frac{\partial f}{\partial x}}.$$ Doing this, analogously, for the other two quantities, will give you the product of three $-1$s and everything else cancels!
REMARK: If you have four variables $x,y,z,w$ related by some functional equation $f(x,y,z,w)=0$, then you should be able to see that the corresponding cyclic rule is $$\left(\frac{\partial x}{\partial y}\right)_{z,w}\left(\frac{\partial y}{\partial z}\right)_{x,w}\left(\frac{\partial z}{\partial w}\right)_{x,y}\left(\frac{\partial w}{\partial x}\right)_{y,z}=+1.$$