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?