# Do Legendre Transforms preserve the number of independent variables? Mathematical question about thermodynamics and natural variables/functions

The questions is to find a natural function of $$\{E, V,\mu\}$$ in thermodynamics which is causing certain conceptual issues for me with the Legendre transform.

The function that has $$\{E,V, N\}$$ as natural variables is the entropy which is clear since the differential form of energy can be inverted for the differential form of entropy as the following:

$$dE = TdS - PdV + \mu dN$$

$$\rightarrow dS = \frac{1}{T} dE + \frac{P}{T}dV -\frac{\mu}{T}dN$$

Now, if I want to find the function that has natural variables of $$\{E, V, \mu\}$$ which presumably seems easy as a Legendre transform from $$N\rightarrow \mu$$.

Doing this in normal Legendre transform procedure, I SHOULD get the following:

$$f(E,V,\mu) = S(E,V,N) - \frac{\partial S}{\partial N} N = S + \frac{\mu}{N}{T}$$

The issue is that if I take the differential of $$f$$, I find that:

$$df = \frac{1}{T}dE + \frac{P}{T}dV + \frac{N}{T} d\mu -\frac{\mu N}{T^{2}}dT$$

In short, the pesky $$dT$$ term actually generates a new independent variable so that I didn't get what was intended and instead got $$f = f(E, V, T, \mu)$$. What is going on and why are more independent variables emerging than intended?

If I want to preserve 3 variables the best that can be done is $$f = f(E, V, \frac{\mu}{T})$$. Does this mean there isn't actually a function with natural variables ${E, V,\mu}? I found these resources but they weren't of much help. ## 2 Answers The Legendre transformation has to preserve the number of independent variables. This transformation can only change an independent variable for the corresponding conjugate variable. In this case the conjugate variable of $$N$$ is $$\mu/T$$, so with a Legendre transformation you can only get $$f=f(E,V,\mu/T)$$. The Legendre transformation would be $$f= S + \Bigg( \frac{\mu}{T} \Bigg) N,$$ and the differential would be $$df = \frac{1}{T} dE + \frac{P}{T}dV + N d\Bigg( \frac{\mu}{T} \Bigg).$$ The conjugate variable of E is $$1/T$$ and the conjugate variable of $$V$$ is $$P/T$$ • Is there perhaps a way to argue that T should be a function of the other variables? Such that$T = T(E, V, \mu)$? Commented Sep 12, 2020 at 20:07 • Sincerly I don't know. I guess from the$1/T= \partial f /\partial E (E,V,\mu/T)\$ and the other equations of state you could try to rearrange so you can solve for T. It might be worth to try the ideal gas. Commented Sep 13, 2020 at 3:10

The issue is that if I take the differential of $$f$$, I find that: $$df = \frac{1}{T}dE + \frac{P}{T}dV + \frac{N}{T} d\mu -\frac{\mu N}{T^{2}}dT$$

The Legendre of entropy cannot produce properties whose independent variables are any combination of variables. The independent variables may be $$E~\text{or}~\left(\frac{\partial S}{\partial E}\right)_{P,N} = \frac{1}{T}, \\ P~\text{or}~\left(\frac{\partial S}{\partial V}\right)_{E,N} = \frac{V}{T},\\ N~\text{or}~\left(\frac{\partial S}{\partial V}\right)_{E,N} = - \frac{\mu}{T}$$ However, if we start with $$U(S,V,N)$$ we can find a Legendre with independent variables $$(T,V,\mu)$$. This Legendre is $$f = U(S,V,N) - S\left(\frac{\partial U}{\partial S}\right)_{E,N} - N\left(\frac{\partial U}{\partial N}\right)_{S,N} \\ = U - T S - \mu N$$ Using $$\mu N = G = U + PV - TS$$ the final result is $$f(T,V,\mu) = - P V$$