# Why does maximal entropy imply equilibrium?

From a purely thermodynamical point of view, why does that entropy have to be a maximum at equilibrium? Say there is equilibrium, i.e. no net heat flow, why can the entropy not be sitting at a non-maximal value?

From the second law of thermodynamics, it follows that $S$ never gets smaller and of course I know that for an isolated system there are many statements involving $\text{d}S=\frac{\delta Q}{T}$, which say what might happen for processes. But if I have equilibrium, then no relevant processes are going on. Some proofs in thermodynamics involve arguments how if we don't have maximal entropy, then we can do something which raises entropy. But why is that relevant or related equilibrium, i.e. to the positions for the termodynamic parameters, which don't change with time? One could argue that probably the energy $U$ doesn't sit at the minimal value, but in thermodynamics, without microscopic forces, the statement that the energy changes towards equilibrium and seeks its minimal value seems to be derived from maximal entropy.

And how can I conclude the converse? Why does equilibrium follow from $\text{d}S=0$?

(edit: I see the question was just bumped on the front page, and as it's a year old now, I guess my interest in the topic has changed in so far as I'm not particularly happy with the formulation of the initial question anymore. That is, I guess without proper stating the definitions, it might be difficult to give a good answer - the thing I still don't "like", and that might be kind of a language problem, is that "to maximize" implies that there is a family of values it could take - but it takes the maximum - while at the same time, you often consider a deviation away from a thermodynamical state to be a transition into a configuration where thermodynamics doesn't apply anymore. Hence, if you go away from the "maximal value", you might lose the concept of there being a temperature at all, but since this is what makes the parameter space with respect you use the word "maximal" entropy, you get into language problems. But at least I do see it's use in explainaing how the entropy/energy evolves once you take the extensive parameters into your control and change the system quasistatically. In any case, I am and was only only interested in a non-statistical mechanics answer here. Clearly, I can make sense of the physics using the microscopic picture anyway, but was purely interested in the formulation of the thermodynamical theory here.)

-
 Sometimes "entropy is maximum in equilibrium" is just put into the formulation of the second law. So what is the exact formulation of the second law you are using? – Yrogirg Jan 30 '12 at 17:41 The Clausius or Kelvin formulations at the beginning of the wikipedia page would suffice. The mathematical formulations involving $S$ are good as well. It's just that I don't see how a statement involving equilibrium, which is a concept involving time and time evolution, can be characterized in classical thermodynamics in terms or $dS$ and so on. – Nick Kidman Jan 30 '12 at 18:02

First, if ${\rm d}S\neq 0$, then the entropy will change, and because something is changing, it's obviously not an equilibrium.

If the physical system doesn't maximize the entropy and it's composed of many parts that may interact with each other, directly or indirectly (it's not disconnected), then any path that allows the entropy to be increased (given fixed values of conserved quantities such as energy) will be realized, so you will be away from the equilibrium because something will change.

If a system is composed of two or more decoupled, non-interacting components – like a bottle of blue lemonade and a bottle of red lemonade – they may be in equilibrium even if the entropy isn't maximized. One could increase the entropy by mixing the liquids but because they're not in contact, they won't be mixed.

On the contrary, if the entropy is already maximized, the only way how the system may evolve is to evolve into another state with the same, maximum value of entropy: there's no higher allowed value and the second law of thermodynamics prohibits a decreasing entropy. This is atypical because when we maximize entropy among all states with the same conserved quantities, the state of maximum entropy is typically unique. For example, if there are also movable macroscopic bodies that may create heat by friction, the entropy is maximized only when the friction stops the macroscopic motion and converts its energy to heat.

In all these discussions, one has to be careful on whether or not we're maximizing the entropy among all states or just the states with the same value of energy (and other conserved quantities). If we allow the energy to change arbitrarily, the entropy isn't really bounded from above (and discussions about its maximization are rendered meaningless) because any body may be heated to pretty much arbitrarily high temperature (or it may collapse into a black hole with an ever greater mass and therefore an ever greater entropy, too).

-
 Okay, the second part basically says that if the maximum is unique, then the entropy has nowhere to go, so equilirbium. I still don't see why $\text{S}\ne 0$ implies that the entropy will change. Just becasue $S(U,V)$ is such that it grows with $U$ and $V$, why does this imply that $S$ will change with time on it's own? In classical mechanics, if $F=-\nabla U$ isn't $0$, then I understand that something will happen. However, I don't see how what in thermodynamics says that "if $\text{d}S\ne 0$, then the entropy will change". What says such a $(U,V),(T,P),...$ or whatever point is not stable? – Nick Kidman Jan 29 '12 at 18:36 Dear Nick, as I said, I think that your statement that "something will change" is only true if the entropy is (locally) non-maximal among states with the same energy. Then it is guaranteed that the system will evolve in the direction in which the entropy increases - and free energy decreases. The force is really $-\nabla \Phi$, a gradient of the free energy, when one does it right, so this increases with the gradient of the entropy. – Luboš Motl Jan 30 '12 at 7:06 But where in the laws of thermodynamics is this movement away from non extremal values encoded? I don't see that if thermodynamics is a theory which makes statements about equilibrium, how it handles points down at the math, which "are not yet" at equilibrium and tells them where to go. – Nick Kidman Jan 30 '12 at 7:15 Dear Nick, the increase of entropy is the second law of thermodynamics. When the entropy isn't maximized, the second law may really be interpreted as a "strict inequality": the entropy strictly increases, so something has to be changing about the system because $S$, a function of the variables, goes up. That's why it's not an equilibrium. The actual rate by which $S$ increases depends on the situation but as I indicated, the force trying to move the system in the higher-entropy direction is really given by $F=-\nabla (E-TS)$, a gradient of free energy. It includes $+T\cdot\nabla S$. – Luboš Motl Jan 30 '12 at 9:38 @Motl: I still don't see why the laws of thermodynamics can make statements about a change in time. I principally don't see how there can be a theorem about what will happen, if there is no time involved in the theory based on three axioms. The force relation $mx''(t)=F=-\nabla...$ isn't part of classical thermodynamics, is it? – Nick Kidman Jan 31 '12 at 22:08

"entropy is maximized" does not make sense as a dynamical statement in thermodynamics (in the usual definition). Entropy is constant in td at the equilibrium for fixed boundary conditions (dS=/=0 makes sense in td, for slow processes under a change of boundary conditions, but that is not directly related to the "entropy is maximized" statement).

Here is a way to make sense of the "entropy is maximized" statement:

1) Consider a set of fixed td states without transitions. E.g. in the previous lemonade example, consider a sample of fixed td states, with different mixtures in the two bottles, such that there is equilibrium in each bottle. The total entropy is maximal on perfectly mixed configurations (you could measure the difference by a process like in 2)). So entropy is maximal for the perfect mixings on the set so defined. But the system stays in any td state with lower entropy as well.

2) Now allow a dynamical transition between the configurations in 1). The non-perfectly mixed states will develop to the perfectly mixed states, which are the equilibrium states. Entropy is maximized dynamically on the set of n-e states. The entropy function which is maximized here is strictly speaking no longer the td entropy, as the latter is not defined except for equilibrium states. It is well-defined in statistical physics, as logarithm of the multiplicity of the n-e state.

1) is not a dynamical statement, 2) takes one outside of td. There is no dynamical maximization of the td entropy, but of a minor generalization of an entropy function defined on n-e states.

-
 thanks for the response. – Nick Kidman Nov 12 '12 at 9:05

Thermodynamics is a science that happens to be concerned with extremely complicated systems that can be analyzed with only a few variables. For example, the gas in a pressurized bottle consists of something like $10^{23}$ atoms, each with a position (3 variables) and a velocity / momentum (3 more variables). That's a lot of variables, but thermodynamics gives us a way of analyzing the system (I'll use the energy formulation) with just volume, total energy, and number of atoms. From this we get the extensive values pressure, temperature and chemical potential (this last is not needed for the fixed amount of gas in a bottle), and other things such as heat capacity, etc.

In making an analysis of these systems, we find that there is another variable that is very useful to know, the "entropy". From a microscopic point of view, the entropy is the logarithm of the number of states that are possible for the system. By "number of states" we mean the number of possible positions and momenta for those $10^{23}$ atoms.

The reason entropy is a useful thing is that it tells us how "easy" it is to set up the atoms in a particular situation. If there is only one way to do it (for example, all the atoms sitting next to each other in a crystalline solid at the bottom of the bottle), then that will be very difficult to achieve. On the other hand, if there are "billions and billions" (never mind exactly how many) ways of assembling that situation (as far as total energy, volume, and number of atoms goes), then that situation will be easy to achieve.

Sometimes you can get a system where the entropy is very small, compared to its maximal value. An example is a bottle with all the (ideal) gas on one side of the container. Such a situation is not in equilibrium because there are so many ways it could reorganize itself that it is doomed to change to a situation of higher entropy. Hence S must me maximized.

Now let me give an example of a situation where the numbers are extremely small but you'll still get an idea how the math works.

Suppose we had a handful of 6-sided dice, say $N$ dice. A given situation is that each die shows a number in {1,2,3,4,5,6}. A thermodynamic variable for the handful is "the total of all the numbers showing on the dice." We suppose that the dice have an interaction which causes them to randomly change their orientation (and hence their numbers). For $N$ dice, the average (or expectation value) for this thermodynamic variable is $N$ times the average number on a die which happens to be 7/2. Thus, on average, the dies will add up to $7N/2$.

Suppose the dies happened to be in a situation where their numbers summed up to $N$ (or $6N$). Such a situation has only one way of being achieved -- all the dies have to show the same number, i.e. "1" (or "6"). Such a situation has an entropy of log(1) as there is only one way it can be achieved, and the entropy is $\ln(1) = 0$. This has an unnaturally low entropy and is not an equilibrium situation.

On the other hand, there are many ways of getting the dies to sum up to $7N/2$, (at least supposing you have an even number of dice!) Thus this situation is one with high entropy. So a handful of jiggling dice, tends to approach thermodynamic equilibrium by exhibiting a total value that is equal to the sum of their average possible values.

-
 Thanks for the response. The point is that I'm rather looing for an explaination "from a purely thermodynamical point of view". A systematic derivation from the laws of thermodynamics would suffice, however I guess a clear definition of equilirbium will have to be stated as well. – Nick Kidman Jan 29 '12 at 19:03