This is a microcanonical approach to the problem of the mixture of two ideal gases. It involves a somewhat tricky integral over the surface of an N-dimensional hypersphere, and as far as I can tell is an example beloved of professors for exam questions. It might be a good one to become familiar with if you’re taking a statistical physics course.

### Question

Enclosed in a box of volume V are N_{1} molecules of species 1 with mass m_{1} and N_{2} molecules of species 2 with mass m_{2}. The system can be considered as an ideal gas with the total energy \(E\).

- Calculate the phase space volume \(\Omega(E,V,N_1,N_2)\) for the case \(N_1\)>>1 and \(N_2\)>>1.
- Calculate the entropy of the system as a function of the ratio \(N_1/N_2\) for constant \(N=N_1+N_2\). Discuss the dependence of the entropy on \(N_1/N_2\) and determine the value of \(N_1/N_2\) at which the entropy is maximal.
- Calculate the pressure $$P=T\left(\frac{\partial S}{\partial V}\right)_{E,N_1,N_2}$$ of the system. How do the different molecular species contribute to the total pressure?
- Consider a situation in which the container is separated into two volume \(V_1\) and \(V_2\) containing only molecules of species 1 and 2 respectively. The total energy of the system is \(E\) and the two compartments are in thermal and mechanical equilibrium. Calculate the entropy of mixing, that is, compare the entropy of the unmixed state with that of the mixture.

### Solution

#### 1. Calculating Phase Space Volume

To calculate the phase space volume in this case, it will be necessary to integrate over the surface of a 3N-dimensional sphere, obtained by transforming the momentum variables.

$$\Omega(E)=\frac{1}{N_1!N_2!}·\frac 1{h^{3N}} \int dq \int \prod_{i=1}^{3N_1} dp_i \int \prod_{j=1}^{3N_2} dp_j \Theta(E-H(p_i,q_i))$$

A few notes:

- The factorials arise from that we are dealing with two independent gas species.
- The integral over dq is just the volume \(V^N\) of the hypersphere.
- Theta is the Heaviside step function.

##### Momentum transformations

At this point it’s sensible to introduce some momentum transformations for the integration:

\begin{eqnarray}

p_1 \to \mathfrak{p}_i = \frac{p_i}{\sqrt{2m_1}} \Rightarrow dp_i=\sqrt{2m_1}d\mathfrak{p}_i \nonumber \\

p_2 \to \mathfrak{p}_j = \frac{p_j}{\sqrt{2m_2}} \Rightarrow dp_j=\sqrt{2m_2}d\mathfrak{p}_j \nonumber

\end{eqnarray}

Putting these back in leads to:

\begin{eqnarray}

\Omega & = & \frac{V^N (2m_1)^{\frac{3N_1}{2}} (2m_2)^{\frac{3N_2}{2}}}{h^{3N} N_1! N_2!} \int \prod_{i=1}^{3N} d\mathfrak{p}_i \Theta \left( E-\sum_{i=1}^{3N}\mathfrak{p}_i^2 \right) \nonumber \\

\Omega & = & \frac{V^N (2m_1)^{\frac{3N_1}{2}} (2m_2)^{\frac{3N_2}{2}}}{h^{3N} N_1! N_2!} · \frac{ \pi^{\frac{3N}{2}} E^{\frac{3N}{2}}}{\left( \frac{3N}{2} \right)!} \nonumber

\end{eqnarray}

We can now split \(\Omega\) into parts by introducing the reduced mass \(\mu=\frac{m_1m_2}{m_1+m_2}\) of the two molecular species:

\begin{equation}

\Omega=\underbrace{ \frac{V^N \pi^{\frac{3N}{2}} (2\mu E)^{\frac{3N}{2}}}{h^{3N} N! \left( \frac{3N}{2} \right)!} }_{\Omega_{\text{id}}} · \underbrace{ \frac{N!}{N_1!N_2!} \left( \frac{m_1}{\mu} \right)^{\frac{3N_1}{2}} \left( \frac{m_2}{\mu} \right)^{\frac{3N_2}{2}} }_{\Omega_{\text{mixed}}}

\end{equation}

The first part of the above equation corresponds to the phase space volume of a system of \(N\) identical particles and mass \(\mu\). We’ll call it \(\Omega_{\text{id}}\). The second part we’ll call \(\Omega_{\text{mixed}}\).

#### 2. Finding the entropy

Splitting the phase space volume up into two parts proves helpful when taking the entropy since one can now use the standard result for an ideal gas for \(\Omega_{\text{id}}\):

\begin{eqnarray}

S&= & k_B \ln \Omega \nonumber \\

&= & k_B \left[ \ln( \Omega_{\text{id}} )+ \ln( \Omega_{\text{mixed}} ) \right] \nonumber \\

&= & S_{\text{id}} + S_{\text{mixed}} \nonumber

\end{eqnarray}

The standard result for \(S_{\text{id}}\) is the result for an ideal gas, particle mass \(\mu\), particle number \(N\):

\begin{equation}

\frac{S_{\text{id}}}{N k_B}= \ln \left[ \frac VN \left( \frac{4\pi \mu E}{3 h^2 N} \right)^{\frac{3}{2}} \right] + \frac 52

\end{equation}

For the second part, \(S_{\text{mixed}}\), including Stirling’s approximation:

\begin{equation}

\frac{S_{\text{mixed}}}{k_B}= N\ln N – N_1 \ln N_1 – N_2 \ln N_2 + N_1 \ln \left( \frac{m_1}{\mu} \right)^{\frac{3}{2}} +N_2 \ln \left( \frac{m_2}{\mu} \right)^{\frac{3}{2}}

\label{eq:rewrite}

\end{equation}

If we define the ratio between the two species numbers:

$$\eta:=\frac{N_1}{N_2}; \frac{N_1}{N}=\frac{\eta}{1+\eta}; \frac{N_2}{N}=\frac{1}{1+\eta}$$

we can use \(\eta\) to rewrite \eqref{eq:rewrite}:

\begin{equation}

\frac{S_{\text{mixed}}}{k_B N}= \frac{\eta}{1+\eta} \left( \ln \left( \frac{m_1}{\mu} \right)^{\frac 32} – \ln \frac{\eta}{1+\eta} \right) + \frac{1}{1+\eta} \left( \ln \left( \frac{m_2}{\mu} \right)^{\frac 32} – \ln \frac{1}{1+\eta} \right)

\end{equation}

To find the maximum entropy, we need only differentiate the mixed contribution since the identical contribution is not a function of \(\eta\):

$$\frac{\partial S}{\partial \eta} \stackrel{!}{=} 0; \eta_0 = \left( \frac{m_1}{m_2} \right)^{\frac 32}$$

We ought to check whether this is a maximum:

$$\frac{\partial^2 S}{\partial \eta^2}\bigg|_{\eta_0} = -\frac{1}{\eta(1+\eta)^2} \lt 0$$

#### 3. Calculating the pressure

To calculate the pressure, using the equation given, we need only differentiate \(S_{\text{id}}\) since \(S_{\text{mixed}}\) is not a function of volume:

$$P=T\left(\frac{\partial S_{\text{id}}}{\partial V}\right)_{E,N_1,N_2}=\frac{Nk_BT}{V}=\frac{N_1k_BT}{V_1}+\frac{N_2k_BT}{V_2} = P_1+P_2$$

So we can see both gases contribute to the pressure according to their number of particles.

#### 4. Entropy of mixing

In this case we are to consider the gases in their respective volumes before the partition is removed and they are mixed together.

So for gas 1:

$$\frac{S_{N_1}}{N_1k_B}=\ln \left[ \frac{V_1}{N} \left(\frac{4\pi m_1 E}{3 h^2 N}\right)^{\frac 32}\right] + \frac 52$$

And the same for gas 2.

Using again the reduced mass,

$$\frac{S_{N_1}}{N_1k_B}=\left(\ln \left[ \frac{V}{N} \left(\frac{4\pi \mu E}{3 h^2 N}\right)^{\frac 32}\right] + \frac 52\right) + \ln\left(\frac{m_1}{\mu}\right)^{\frac 32}$$

$$\frac{S_{N_2}}{N_2k_B}=\left(\ln \left[ \frac{V}{N} \left(\frac{4\pi \mu E}{3 h^2 N}\right)^{\frac 32}\right] + \frac 52\right) + \ln\left(\frac{m_2}{\mu}\right)^{\frac 32}$$

The entropy after mixing will be higher than before, so the change in entropy will be

\begin{eqnarray}

\Delta S&=&S_\text{id}+S_\text{mixed}-S_{N_1}-S_{N_2} \nonumber \\

\frac{\Delta S}{k_B}&=&-N_1 \ln\frac{N_1}{N}-N_2 \ln\frac{N_2}{N} \nonumber

\end{eqnarray}