# How it is possible for chemical potential of ideal gas to vary based on composition?

According to this post,

$$\mu_i = g_i + RT \ln \frac{N_i}{N_1+N_2}$$

It shows that chemical potential indeed do vary with composition. I have trouble understanding how this equation is derived.

I started from Sakur-Tetrode equation and the definition for Gibbs energy $$G=U+PV-TS$$ and I got the following for the ideal gas Gibbs energy

$$G=Nk_BT\ln\left[\frac{N}{V}\left(\frac{h^2}{2\pi m k_BT}\right)^\frac32\right]$$

Consider a sealed container of volume $$V$$ with constant and well-defined temperature and pressure $$P,T$$ filled with a mixture of two kinds of ideal gases 1 and 2 with particle counts $$N_1$$ and $$N_2$$. The Gibbs energy becomes

$$G=(N_1+N_2)k_BT\ln\left[\frac{N_1+N_2}{V}\left(\frac{h^2}{2\pi m k_BT}\right)^\frac32\right]$$

By the ideal gas law,

$$G=(N_1+N_2)k_BT\ln\left[\frac{P}{k_BT}\left(\frac{h^2}{2\pi m k_BT}\right)^\frac32\right]$$

The chemical potentials for the mixture are

$$\mu_1 = \left(\frac{\partial G}{\partial N_1}\right)_{T,P,N_2}=k_BT\ln\left[\frac{P}{k_BT}\left(\frac{h^2}{2\pi m k_BT}\right)^\frac32\right]$$

$$\mu_2 = \left(\frac{\partial G}{\partial N_2}\right)_{T,P,N_1}=k_BT\ln\left[\frac{P}{k_BT}\left(\frac{h^2}{2\pi m k_BT}\right)^\frac32\right]$$

So

$$\mu_1=\mu_2$$

You can see that under the conditions of constant temperature and pressure, chemical potential does not depend on the number of particles $$N$$, so it is constant. Thus, chemical potentials does not vary on mixture composition since they do not depend on $$N_1$$ and $$N_2$$.

What am I missing?

• Entropy of mixing… Apr 15, 2023 at 2:26
• @JonCuster What do you mean? Apr 15, 2023 at 3:11
• Gibbs's paradox... Apr 15, 2023 at 12:29

You fell in the trap known as Gibbs's paradox: you took the Gibbs energy of pure component and generalized it to mixtures by replacing $$N$$ with $$N_1+N_2$$.
We need to start from the partition function of the ideal gas. For a mixture of two components the partition function is $$\tag{1} Z_{1,2} = \frac{1}{N_1!N_2!}\frac{V^{N_1+N_2}} {\Lambda_1^{3N_1}\Lambda_2^{3N_2}}$$ with $$\Lambda_i=h/\sqrt{2\pi m_i k_B T}$$. For a single component this reduces to $$\tag{2} Z = \frac{1}{N}\frac{V^{N}} {\Lambda^{3N}}$$ As you see, the two-component partition function is not the partition function of one-component with the substitution $$N\to N_1+N_2$$. Apart from the $$\Lambda$$'s, the real issue here is the factorial term $$N_1! N_2!$$, which is the term that resolves the paradox. More precisely, if this term is omitted we obtain the wrong result (the "paradox").
• I found that $$\mu_1=\left(\frac{\partial F}{\partial N_1}\right)_{T,V,N_2}=k_BT\ln\left[\frac{N_1}{V}\left(\frac{h^2}{2\pi m k_BT}\right)^\frac32\right]$$ where $F=-k_BT \ln Z_{1,2}$. I am still not sure how it is not $$\mu_1 = g_1 + RT \ln \frac{N_1}{N_1+N_2}$$ Apr 15, 2023 at 22:41
• Your $\mu_1$ is correct. Then show $$\frac{V}{N_1} = \frac{V_1}{x_1 N_1}$$ where $V_1$ is the volume occupied by pure 1 at same $T$ and $P$ (remember, this is ideal gas) and finally write your result as $$\mu_1=\mu_1^0 + k_B T\ln x_1$$ where $\mu_1^0$ is the chemical potential of pure 1 at same $T$ and $P$ as the mixture. Apr 16, 2023 at 0:00
• I see, thank you! So it seems like $\frac{N_1}{V}=\frac{x_1 N_1}{V_1}=\frac{p_1}{k_BT}$ which gives partial pressure $p_1=x_1\frac{N_1 k_BT}{V_1}=x_1 P$ where $P$ is total pressure? Apr 16, 2023 at 0:22