# Formally define temperature as derivative of max gibbs entropy?

This question asks whether we can define the temperature in terms of the Gibbs entropy in the case of the canonical ensemble. In this question I want to ask whether we can define temperature in terms of Gibbs entropy in general, by choosing the maximum entropy ensemble consistent with a set of macro-variables.

First, Let $$p$$ be a ensemble, or distribution over micro-states $$S$$ of a system. Define the Gibbs entropy of the ensemble as $$H(p)= -\sum_ip_i \log(p_i)$$. Now assume we have a set of macro-variables $$\mathcal V$$, such as energy, i.e. $$E \in \mathcal V$$. For a given value $$V=(E,...)$$ of the variables, let $$H(V)= \max_{p\in P_V}H(p)$$, where $$P_V$$ is the set of distributions $$p$$ such that $$\sum_ip_i E_i=E$$, where $$E_i$$ is the energy in microstate $$i$$, and similarly for the other variables in $$\mathcal V$$.

Then define temperature as the derivative of "maximum entropy" w.r.t. energy:

$$\frac 1 T = \frac {\partial H(V)}{\partial E}$$

Is this a correct general way to define temperature?

• Since you are looking for precision and generality, you should also add clear information on what is being held constant in the partial derivative. – Andrew Steane Apr 7 at 13:11
• @andrewSteane, $V$ is a tuple of macro observables like Energy. So its keeping all the other macro observables constant. – user56834 Apr 7 at 15:27
• There seems to some confusion in your definition of the probabilities $p_i$. If a particular macrostate $V=(E,N,S,...)$ has been chosen (I have added some other variables used to specify the state), then your $\sum_i p_iV_i$ becomes $p_1E+p_2N+p_3S+...$, which doesn't make sense. Maybe you can clarify this a bit. – M. Zeng Apr 10 at 21:25
• @Mr.Zeng, edited. – user56834 Apr 11 at 5:19

If you use the average energy $$E = \sum p_i E_i$$ of the canonical ensemble as independent variable, yes, your final formula is a correct way to get the temperature of that state, although your notation and description may hide the important fact that the maximum is a constrained maximum, equivalent to the unconstrained maximization of a function differing from $$H$$ by the sum of the constraint equations multiplied by Lagrange multipliers.
The equation $$\frac 1 T = \frac {\partial H(V)}{\partial E}$$ is simply the thermodynamic definition of temperature in term of entropy and energy and it follows directly from the identification of $$H$$ as the thermodynamic entropy (true in the thermodynamic limit).
However, I would say that the description in term of $$E$$ sounds quite artificial, since the natural description of the canonical ensemble is in term of $$T$$ and not $$E$$ as independent variable. Therefore, the previous equation should be seen as an implicit definition of the $$E=E(T)$$ relation, allowing to rewrite $$H$$ and the $$\{ p_i \}$$ as functions of $$T$$.
• "I would say that the description in term of $E$ sounds quite artificial". I'm surprised you say that. Isn't this very standard? Entropy of a macrostate in terms of energy, and e.g. the Boltzmann distribution also is in terms of energy. – user56834 Apr 13 at 9:51
• What do you mean by "it follows directly from the identification of $H$ as the thermodynamic entropy (true in the thermodynamic limit)"? In particular, why is it only true in the thermodynamic limit? (by which I assume you mean, when the distribution is equal to e.g. the canonical ensemble?0 – user56834 Apr 13 at 9:53