# Notation/convention in thermo; How is $dE = TdS - PdV$ independent of $T$ and $P$?

As a concrete example, in section 1.3 Equilibrium Statistical Physics by Plischke and Bergersen we can read

The simplest example is the internal energy $$E(S,V)$$ for a $$PVT$$ system. The second law for reversible processes reads $$dE = TdS - PdV = \delta Q - \delta W.$$

My question is not about this expression in particular, but about all expressions of this type. I do not understand how $$E$$ is a function of only $$S$$ and $$V$$. You see, when I read a differential expression I interpret it as a linearization. So for the above I read that a small change in $$S$$ will produce a change in $$E$$ proportional to $$T$$ (to first order). But since the size of that change depends on $$T$$, isn't $$E$$ also obviously a function of $$T$$? Moreover, it is not hard to imagine a path through $$(P,V,T,S,\dotsc)$$-space along which $$T$$ or $$P$$ vary. Integrating over such a path I cannot simply hold $$T$$ and $$P$$ constant, so how is the above expression valid?

I seem to be missing something fundamental. Or are there additional assumptions with such an expression? Maybe that we perform the integral along a special path, along the $$T$$ and $$P$$ axes, perpendicularly to all the other axes, and then use the exactness of $$dE$$ to know that all other paths would give the same result? But can we know that the thermodynamic axes are perpendicular (i.e. that they are not functionally dependent, I suppose), and that such a path exists? What do we do if the final state has a different temperature than the initial state ($$T_f \neq T_i$$).

I don't even know if I am making sense. Maybe I am thinking of this all wrong. I would really want to understand this properly, so any help is truly appreciated!

This is a common confusion, which I had for quite a while, until I read Callen's book.

In thermodynamics, we have a whole bunch of variables: $$E, T, S, V, p, N$$, etc. However, they are not all independent. It is found experimentally (or from statistical mechanics) that assuming that the number of particles $$N$$ is fixed (for simplicity), you can only fix two variables, and the rest depend on those. Of course, you can pick any two variables to fix; which ones you choose is related to the experimental situation you're considering. For example, physicists tend to like isolated systems, so that fixing $$V$$ and $$S$$ is feasible, while in chemistry things are often exposed to the atmosphere, so that $$T$$ and $$p$$ just come from the air.

When we write $$E(S,V)$$, we are not saying that the energy is independent of the temperature. We're just saying that right now, we're choosing to write it mathematically as a function of $$S$$ and $$V$$. We can do some variable substitutions and write it as $$E(T,V)$$ if you want: the physical quantity is the same, but the formula is different. You can use any pair of independent variables, but quantities tend to have "natural" variables in terms of which they are expressed most easily. This is clear from the first law: using $$S$$ and $$V$$ as independent variables, the partial derivatives of the energy are

$$\frac{\partial E}{\partial S}\bigg|_V = T(S,V) \quad \text{and} \quad \frac{\partial E}{\partial V}\bigg|_S = -p(S,V),$$

while $$\partial E / \partial T |_V$$ and $$\partial E / \partial V |_T$$ are more complicated and I don't feel like deriving them.

Pay attention to what I wrote above, though: $$T$$ and $$p$$ are also functions of entropy and volume! They are not independent! Knowing that $$\partial E / \partial S |_V = T$$ is not the full picture, because we still don't know $$T$$ as a function of $$S$$ and $$V$$, but it's something. The actual expressions for all the functions depend on the precise system being considered: often, they don't have closed form expressions.

• Ok, this clears it up a somewhat (as does the other answers and comments). Thank you! Could you also provide some insight into integration from one state to another? I suppose I must then have explicit expressions for $T(S,V)$ and $p(S,V)$, possibly with the help of some constraint/special path (constant $T$ for example)? What about integrating from a state with $T = T_i$ to one with $T = T_f \neq T_i$?
– ummg
Sep 2, 2020 at 21:21
• "It is found experimentally (or from statistical mechanics) that assuming that the number of particles N is fixed (for simplicity), you can only fix two variables, and the rest depend on those." Could this be fleshed out? It's arguably the key part. Sep 2, 2020 at 21:24
• @ummg Yes, to integrate you generally need explicit expressions for the functions. Of course, if your path is constant temperature, you don't need an expression for $T$, because it's going to be constant. But in general it depends on the system being considered. Sep 2, 2020 at 22:18
• @Chemomechanics I didn't include much more detail because it should be pretty intuitive if you imagine handling a box of gas and you know the ideal gas equation. What sort of things do you think I could mention? Sep 2, 2020 at 22:20
• The ideal gas is a spectacularly bad model to generalize from in this context, perhaps the worst, considering that its $dP$, $dS$, and $dV$ coefficients are all zero when paired with $dT$. Sep 2, 2020 at 22:33

If in doubt, revert to something more familiar such as a function $$z(x,y)$$ which gives the height of a surface as a function of two variables: $$dz = \frac{\partial z}{\partial x} dx + \frac{\partial z}{\partial y} dy$$ Then give whatever names you like to the partial derivatives of this $$z$$. For example, let's define $$T \equiv \frac{\partial z}{\partial x}, \;\;\;\;\;\;\;\; P \equiv - \frac{\partial z}{\partial y} .$$

These partial derivatives will themselves be functions of $$x$$ and $$y$$: $$T = T(x,y), \;\;\;\;\;\;\; P=P(x,y)$$ so there is no loss of generality. And now we have $$dz = T dx - P dy$$ which is mathematically the same sort of equation as the one you asked about.

The important point in this example is that we have a system in which $$E$$ is a function of just two variables, and the quantities $$T,S,P,V$$ in the equation are all functions of state (whereas $$Q$$ and $$W$$ are not).

• This answer seems to beg the question. Why did you start with two variables $(x,y)$ instead of four or six or more $(P, V, S, T, \mu_i, N_i)$? Sep 2, 2020 at 21:21
• @Chemomechanics That's right; you have to know at the outset that you are dealing with a function of two variables, otherwise there would be further terms in the formula for $dE$. This illustrates that there is real content in the formula; it is why it is called a fundamental relation---it states something non-trivial. To know how many terms there are, you have to know how many independent ways a system can exchange energy with other systems. Conversely, the fundamental relation asserts how many such independent ways there are for the given system. Sep 2, 2020 at 22:52
• This answer seems to contradict the accepted one. Which one is correct? Sep 5, 2020 at 6:50
• @thermomagneticcondensedboson I don't think this answer contradicts the one by Javier. We both point out that one must start out knowing that just two independent variables are sufficient to specify the state. But if you want to say what you think is contradictory then say and I will try to resolve it. Both answers are right; they merely present different aspects of the same information. Sep 5, 2020 at 11:15

The extensivity of energy leads to the Gibbs-Duhem equation $$S\,dT-V\,dP+\sum_i N_id\mu_i=0.$$

So you're free to expand the internal energy $$U=TS-PV+\sum_i\mu_iN_i$$ using every variable present as $$dU=T\,dS+S\,dT-P\,dV-V\,dP+\sum_i\mu_i\,dN_i+\sum_iN_i\,d\mu_i,$$ but this then reduces to $$dU=T\,dS-P\,dV+\sum_i\mu_i\,dN_i.$$ Every additional type of work adds two terms to the complete expansion and one to the Gibbs-Duhem law, leading to a single additional $$(\mathrm{generalized\ force})\,d(\mathrm{generalized\ displacement})$$ term in the fundamental relation. Many themodynamics discussions skip over this point. Does this get at what you're asking about?

• I think this explanation is circular. The Gibbs-Duhem relation comes from the fact that your last equation, for $dU$, is true.
– pwf
Sep 2, 2020 at 20:29
• My aim isn't to derive anything rigorously but only to show how that relation reduces the number of differential terms, which seems to get at the heart of the question and also isn't currently mentioned by another answer. Sep 2, 2020 at 21:23