# Entropy of Mixing

- Page ID
- 1945

A gas will always flow into a newly available volume and does so because its molecules are rapidly bouncing off one another and hitting the walls of their container, readily moving into a new allowable space. It follows from the second law of thermodynamics that a process will occur in the direction towards a more probable state. In terms of entropy, this can be expressed as a system going from a state of lesser probability (less microstates) towards a state of higher probability (more microstates). This corresponds to increasing the \(W\) in the equation \( S=k_B\ln W \).

## The Mixing of Ideal Gases

For our example, we shall again consider a simple system of two ideal gases, A and B, with a number of moles \( n_A \) and \( n_B \), at a certain constant temperature and pressure in volumes of \( V_A \) and \( V_B \), as shown in Figure \(\PageIndex{1A}\). These two gases are separated by a partition so they are each sequestered in their respective volumes. If we now remove the partition (like opening a window in the example above), we expect the two gases to randomly diffuse and form a homogenous mixture as we see in Figure \(\PageIndex{1B}\).

To calculate the entropy change, let us treat this mixing as two separate gas expansions, one for gas A and another for B. From the statistical definition of entropy, we know that

\[ \Delta S=nR\ln \dfrac{V_2}{V_1} \;.\]

Now, for each gas, the volume \( V_1 \) is the initial volume of the gas, and \( V_2 \) is the final volume, which is both the gases combined, \( V_A+V_B \). So for the two separate gas expansions,

\[ \Delta S_A=n_A R\ln \dfrac{V_A+V_B}{V_A} \]

\[ \Delta S_B=n_B R\ln \dfrac{V_A+V_B}{V_B} \]

So to find the total entropy change for both these processes, because they are happening at the same time, we simply add the two changes in entropy together.

\[ \Delta_{mix}S = \Delta S_{A}+\Delta S_{B}=n_{A}R\ln \dfrac{V_{A}+V_{B}}{V_{A}}+n_{B}R\ln \dfrac{V_{A}+V_{B}}{V_{B}} \]

Recalling the ideal gas law, PV=nRT, we see that the volume is directly proportional to the number of moles (Avogadro's Law), and since we know the number of moles we can substitute this for the volume:

\[ \Delta_{mix}S=n_{A}R\ln \dfrac{n_{A}+n_{B}}{n_{A}}+n_{B}R\ln \dfrac{n_{A}+n_{B}}{n_{B}} \]

Now we recognize that the inverse of the term \( \frac{n_{A}+n_{B}}{n_{A}} \) is the mole fraction \( \chi_{A}=\frac{n_{A}}{n_{A}+n_{B}} \), and taking the inverse of these two terms in the above equation, we have:

\[ \Delta_{mix}S=-n_{A}R\ln \dfrac{n_A}{n_A+n_B}-n_BR\ln \dfrac{n_A}{n_A+n_B}\chi_{B} = -n_A R\ln \chi_A -n_B R\ln \chi_B \]

since \(\ln x^{-1}=-\ln x\) from the rules for logarithms. If we now factor out R from each term:

\[ \Delta_{mix}S=-R(n_{A}\ln \chi_{A}+n_{B}\ln \chi_{B}) \]

represents the equation for the entropy change of mixing. This equation is also commonly written with the total number of moles:

\[ \Delta_{mix}S=-nR(\chi_A \ln \chi_A+\chi_B\ln \chi_B) \label{Final}\]

where the total number of moles is \( n=n_A+n_B \)

Notice that when the two gases will be mixed, their mole fraction will be less than one, making the term inside the parentheses negative, and thus the entropy of mixing will always be positive. This observation makes sense, because as you add a component to another for a two-component solution, the mole fraction of the other component will decrease, and the log of a number less than 1 is negative. Multiplied by the negative in the front of the equation gives a positive quantity. Equation \(\ref{Final}\) applies to both ideal solutions and ideal gases.

## References

- Chang, Raymond. Physical Chemistry for the Biosciences. Sausalito, California: University Science Books, 2005.

## Outside Links

- Sattar, Simeen. "Thermodynamics of Mixing Real Gases."
*J. Chem. Educ.***2000***77*1361.

## Contributors

- Konstantin Malley (UCD)