# Entropy for a general probability distribution and Boltzmann distribution

Suppose $p_i$ is a given probability distribution. Now, we know that the Entropy associated with the distribution is:$$S(p_i)=-k_B\sum p_i \ln p_i$$ Taking differential of $S(p_i)$ we get:$$dS(p_i)=-k_B\sum dp_i \ln p_i-k_B\sum dp_i=-k_B\sum dp_i \ln p_i$$ Since $\sum dp_i=0$.$$\delta Q=-k_BT \sum dp_i \text{ln} p_i\tag{1}$$ Again, we know that $\delta W=-PdV=-\langle P\rangle dV=\sum p_i\left(\frac{\partial E}{\partial V}\right)_NdV$ and $dU = d \langle E \rangle= \sum p_idE_i + \sum dp_iE_i$

clearly $$δQ = \sum dp_iE_i \tag{2}$$ Equating (1) and (2) we get: $$δQ = \sum dp_iE_i = −k_BT \sum dp_i \ln p_i$$ or, $$\sum dp_i\left(E_i + k_BT \ln p_i\right) = 0$$

or $$\sum dp_i\left(\frac{ E_i}{ k_BT} + \ln p_i\right) = 0$$

Here I cannot understand how can this result be interpreted.

Is this result general?

If I put $$\frac{ E_i}{ k_BT} + \ln p_i = C$$where $C$ is a constant, then,$$p_i = A\exp\left( − \frac{E_i}{ k_BT}\right)$$

which is the Boltzmann distribution.

Other than the Boltzmann Distribution is there any other possibility or other interpretation of the formula?

From the very beginning you assume the equation $S = -k_B \sum_{i} p_i \ln p_i$. It seems (from your eq. 1) that you're not merely defining S by this equation, but are taking it as established that S is entropy as defined in thermodynamics.
Many treatments of the foundations of statistical mechanics (e.g. Schrödinger, Hill) arrive at $S = -k_B \sum_{i} p_i \ln p_i$ via finding the distribution with the greatest $-\sum_{i} p_i \ln p_i$ in a canonical ensemble, which turns out to be the Boltzmann distribution, and hence discover the link between thermodynamic entropy and $-\sum_{i} p_i \ln p_i$. In other words they justify $S = -k_B \sum_{i} p_i \ln p_i$ by an argument that goes via the Boltzmann distribution. It is, in my opinion, a beautiful argument.
Now since you are assuming from the beginning that $\text{Thermodynamic entropy} = -k_B \sum_{i} p_i \ln p_i$ , it's not surprising that you finish up by deducing the Boltzmann distribution – it was hidden in your premisses.
• Can't work out why spacings are missing after latex strings $….$ embedded in my text. Sorry. Feb 4, 2018 at 22:57