Independence of thermodynamic variables A given thermodynamical system has a number of state variables, not all of which are independent. Suppose that we have a system which can be specified by $k+1$ extensive variables: $U,X_1,\cdots,X_k$. We also have $k$ intensive variables which are conjugate to the $k$ extensive variables $X_i$. To what extent are these $2k+1$ variables independent? 
For example, we can always express the internal energy in terms of its natural variables:
$$U=U(S,V,N_1,\cdots, N_{k-2})$$
But what about in terms of other variables? How about exchanging an extensive variable for its conjugate internal variable, say $T$ in place of $S$:
$$U=U(T,V,N_1,\cdots,N_{k-2})?$$
Or perhaps replacing $T$ by some unrelated intensive variable, say $p$ in place of $S$:
$$U=U(p,V,N_1,\cdots,N_{k-2})?$$
Will any combination of the remaining thermodynamic variables serve to functionally determine $U$? If not, then what exactly relates these $2k+1$ variables?
 A: Perhaps you are looking for the notion of Legendre transform. Here is the general idea: suppose you have a function of some sets of variables, say $\mathbf x$ and $\mathbf v$, and so $f = f(\mathbf x,\mathbf v)$. You usually get a new set of variables, conjugate to $\mathbf v$ by taking the Legendre transform of $f$ w.r.t. $\mathbf v$. So what you do is to define said conjugate variables, say $\mathbf p = \nabla_{\mathbf v}f$, which depend on $\mathbf x$ and $\mathbf v$ through
$$\mathbf p(\mathbf x,\mathbf v)=\nabla_{\mathbf v}f(\mathbf x,\mathbf v).$$
Now one has to require $f$ to have suitable concavity property, and in this case we could require $f$ to be such that the Hessian $D^2_{\mathbf v}f$ to be non-zero on the relevant domain. If this is the case we can then invert the relation to get
$$\mathbf v(\mathbf x,\mathbf p) = g(\mathbf x,\mathbf p),$$
for some function $g$.
Suppose that $\mathbf x\in\mathbb R^n$ and that $\mathbf v\in\mathbb R^m$; then among the $n+2m$ variables $\mathbf x,\mathbf v,\mathbf p$ there are $m+1$ constraints: $m$ coming from $g$ and 1 coming from $f$. Therefore you only have $n-1$ independent variables. The ones that you can then take as independent among the set $\mathbf x,\mathbf v,\mathbf p$ usually depends on how well-behaved the functions you get are. In general you get a (possibly smooth) submanifold of $\mathbb R^{n+2m}$, and the choice correspond to the fact that your atlas should have well-behaved charts (think of the sphere in $\mathbb R^3$, where you can't give a global chart, but you have to patch at least two charts together).
