It seems that entropy of a system is related to the fluctuation in total energy due to exchange with the environment. But in an isolated system, there can't be any fluctuation, which would imply zero entropy. Is this correct?
In detail, in Susskind's lectures on Statistical Mechanics, he derives the Boltzmann distribution with the following setup:
- A "system" is defined as $N$ copies of a "subsystem", each weakly connected to each other such that they can exchange energy. Initially, each copy is given $E$ total energy, so that the total energy of the system is $NE$. This peculiar setup is meant to simulate the idea that the subsystem could be in an infinite heat bath.
- Each copy can take on some set (possibly infinite) of discrete states $i$, each having a distinct energy level $E_i$. The energy levels are simply given to us as a result of some physical laws due to the characteristics of the subsystem.
- A "configuration of the system" is an assignment of N states, one to each subsystem, e.g. $(c_1, c_2, ..., c_N)$. Because each configuration specifies a state, and therefore an energy level to each subsystem, the configuration also determines the total energy of the system, therefore only certain configurations fulfill the energy constraint. We assume that each configuration that satisfies the constraint, is equally probable.
- An "occupancy state" is a description of a configuration. It is the set $(n_1, n_2, ..., n_k)$, ($k$ may be infinite) for each energy level, how many subsystems occupy that energy level. The total number of configurations for a given occupancy state is $\dfrac{N!}{\prod_i^k{n_i!}}$.
- By Stirling's formula, $\lim_{n \rightarrow \infty}{N!} = N^Ne^{-N}$, and $\lim_{n \rightarrow \infty}{\log \dfrac{N!}{\prod_i^k{(Np_i)!}}} = -N \sum_i{p_i \log p_i}$. Therefore, the occupancy state that has the maximal number of configurations is most probable, and this happens to be the one whose occupancy state distribution has maximal entropy.
So far so good. So, zooming out a bit, we can look at the subsystem in its heat bath, and see that the energy of the subsystem fluctuates around an average energy level $E$, and that the system in fact spends $p_i$ fraction of time with energy level $E_i$, with $\sum_i{p_i E_i} = E$. The "entropy of the subsystem" is given as $S = - \sum_i{p_i \log p_i}$.
But, if the subsystem were not in a heat bath, its energy would not fluctuate at all. By this logic, its entropy would be zero. What???