# Minimization of energy and maximization of entropy

Are maximization of entropy and minimization of energy equivalent? Or are they contrary?

Why should the thermodynamic potentials such as $G$, $A$, etc, be minimum at equilibrium?

The ideia is which constraints you are dealing with. When you have a system with have Fixed Energy, Number of Particles and Volume (which we will end up calling micro-canonical ensamble), what you seek is to maximize entropy while respecting these constraints. So when you extremize entropy, you can't really extremize (internal) energy.

When a system can exchange energy but not Number of Particles nor volume, we speak of the Canonical Ensamble, where the Helmholtz Free Energy (or Helmholtz Potential) plays crucial role. Since you can exchange energy in form of heat with a bigger system (nicely called 'heat bath'), which is in termal equilibrium at temperature $T$, you can't really fix entropy because entropy can change when you exchange energy, nor it makes sense to extremize entropy because of this same heat flow. What you end up with is that you need a new 'variable' to extremize that you can maximize/minimize with constant number, volume and temperature. This guy is exactly the Helmholtz free energy.

You can go on with this reasoning, and depending on what you choose, you will end up with different thermodynamical potentials, like the Gibbs Free Energy or the Gran Canonical Potential.

All the way, we extremize each of these variables exactly because we believe they are maximum/minimum at thermodynamical equilibrium, while respecting the constraints that you impose in your system.

In the canonical situation, you have a total system , which is made of a heat reservoir "HR" (with constant temperature $T$) and the systeme to be observed "OBS".

If we call $E_{total}$ the total energy of the system (HR + OBS), it can be shown that the total entropy of the system (HR + OBS) $S_{total}$ could be written :

$$S_{total} = S_{HR}(E_{total}) - \frac {F_{OBS}}{T}$$ where $F_{OBS}$ is the free energy of the observed system : $$F_{OBS} = U_{OBS} - TS_{OBS}$$

($U_{OBS}$ and $S_{OBS}$ are the internal energy and the entropy of the observed system).

and where $S_{HR}$ is the entropy of the heat reservoir.

The total system (HT +OBS) being isolated, the entropy $S_{total}$ can only increase, but because $S_{HR}(E_{total})$ is a constant, this means that the free energy $F_{OBS}$ of the observed system can only decrease.

In the grand-canonical situation (reservoir with fixed temperature and chemical potential), You can make a similar argument, but with the grand-potential instead of the free energy.