# Classical Grand canonical partition function derivation

Consider a classical grand canonical ensemble. Let $S_r$ be the reservoir entropy. Suppose it could be expanded at first order:

$$S_r \approx S_r(E_t,N_t) + \frac{\mathrm dS_r}{\mathrm dE_i} \cdot E_i + \frac{\mathrm dS_r}{\mathrm dN_i} \cdot N_i$$

where $E_t$, $N_t$ are the total energy and total particle number of the reservoir+system setup, and $E_i$, $N_i$ are the energy and particle number of an $i$ microstate of the system. So we can rewrite it as:

$$S_r(E_t,N_t) + \frac{\mathrm dS_r}{\mathrm dE_i} \cdot E_i + \frac{\mathrm dS_r}{\mathrm dN_i} \cdot N_i=S_r(E_t,N_t) - \frac{\mathrm dS_r}{\mathrm dE_r} \cdot E_i - \frac{\mathrm dS_r}{\mathrm dN_r} \cdot N_i$$

If we remember that $\frac{\mathrm dS_r}{\mathrm dE_r}=\frac1T$ and $\mu = -T~\frac{\mathrm dS_r}{\mathrm dN_r}$, we get:

$$S_r(E_t,N_t) - \frac{\mathrm dS_r}{\mathrm dE_r} \cdot E_i - \frac{\mathrm dS_r}{\mathrm dN_r} \cdot N_i=S_r(E_t,N_t)-\frac{E_i}T+\mu N_i$$

Provided that the probability to find the system in a specific microstate is $P_i \approx e^{S_r/k_BT}$, how can I get from here to the traditional formula involving the grand canonical partition function, i.e.

$$P_i=\frac{e^{-[E_i/T+\mu N_i]/k_BT}}{\sum e^{-[E_i/T+\mu N_i]/k_BT}}\;?$$

• Do you know how to do it for the microcanonical ensemble? – DanielSank Jun 15 '16 at 19:50
• More or less @DanielSank..but in this specific situation I fall into some specific problems – Lo Scrondo Jun 15 '16 at 20:39
• Describe the specific problems, please. – DanielSank Jun 15 '16 at 20:48
• I looked back to my notes, and now everything's clear! I previously made an enormous derivation and got lost in the algebraic details, so thank you @DanielSank to have let me look in the right direction. – Lo Scrondo Jun 16 '16 at 1:19