# Derive expression for internal energy of mixing and entropy of mixing using statistical thermodynamics

I want to derive an expression for the internal energy of mixing, $\Delta_\mathrm{mix}U$, and entropy of mixing, $\Delta_\mathrm{mix}S$. The framework for this is the Lattice Theory of Ideal Solutions. Specifically, I am mixing $N_A$ molecules of type A with $N_B$ molecules of type B together. I am supposed to find the following two relations:

$$\Delta_\mathrm{mix} U = 0 \\ \Delta_\mathrm{mix} S = -kM (x_A \ln x_A + x_B\ln x_B)$$

## My attempted solution

I have the canonical partition function for an ideal solution of two different components:

$$Q = \left( q_A e^{-cw_{AA}/2kT} \right)^{N_A} \left( q_B e^{-cw_{BB}/2kT} \right)^{N_B} \frac{(M)!}{N_A!N_B!}$$

Taking the logarithm

$$\ln Q = N_A\ln q_A - N_A\frac{cw_{AA}}{2kT} + N_B\ln q_B - N_B\frac{cw_{BB}}{2kT} + M \ln M - N_A\ln N_A - N_B \ln N_B$$

where $w_{xx}$ is the pairwise interaction energy, $M=N_A+N_B$ is the total number of molecules = number of lattice sites.

Further, some thermodynamical relations for this system

$$U = kT^2\left( \frac{\partial \ln Q}{\partial T} \right)_{N,M}$$

$$S = \frac{U}{T} + k\ln Q$$

The internal energy of mixing and entropy of mixing should be

$$\Delta_\mathrm{mix}U = \Delta U_A + \Delta U_B \\ \Delta_\mathrm{mix}S = \Delta S_A + \Delta S_B$$

Generally we have that

## $$\Delta U = U_\mathrm{final} - U_\mathrm{initial} \\ \Delta S = S_\mathrm{final} - S_\mathrm{initial}$$

I am a bit confused about how to compare the final and initial conditions of the system. I assume that we have initially two separated and equal volumes, one containing $N_A$ of A and one containing $N_B$ of B. Then we allow flow between the two volumes. Hence, the final volume is twice the initial volume. $N_A$ and $N_B$ are constant during the mixing. So I should have something like this

$$\Delta U_A = U_{final} - U_{initial} = kT^2\left( \frac{\partial \ln Q}{\partial T} \right)_{N_A,M} - kT^2\left( \frac{\partial \ln Q}{\partial T} \right)_{N_A,M/2}$$

and similarly for the other component. I just replace $M$ with $M/2$ for the expression of the initial state for both components? Most of the terms will be zero when doing the derivations, and the non-zero terms will actually just cancel. This gives that $\Delta_\mathrm{mix} U = 0$, which is the expected result for an ideal solution.

Looking at $\Delta_\mathrm{mix} S$ we have

$$\Delta_\mathrm{mix} S = \Delta S_A + \Delta S_B = [S_{f,A} - S_{i,A}] + [S_{f,B} - S_{i,B}] \\ = \left[ \left(\frac{U_{f,A}}{T} + k\ln Q_f \right)- \left( \frac{U_{i,A}}{T} + k\ln Q_i \right) \right] + \left[ \left( \frac{U_{f,B}}{T} + k\ln Q_f \right) - \left( \frac{U_{i,B}}{T} + k\ln Q_i \right) \right] \\ =\frac{1}{T} (U_{f,A} - U_{i,A} + U_{f,B} - U_{i,B}) + 2k(\ln Q_f - \ln Q_i) \\ = \frac{\Delta_\mathrm{mix}U}{T} + 2k(\ln Q_f - \ln Q_i) \\ = 2k(\ln Q_f - \ln Q_i)$$

where I used in the last step that $\Delta_\mathrm{mix} U=0$ for an ideal solution, as explained above. However, using this last expression to calculate the entropy of mixing, I find that (most of the terms cancel directly)

$$\Delta_\mathrm{mix}S = kM \ln (2N_A + 2N_B)$$

which is quite different from the correct expression. Is there something wrong with my procedure? (there likely is!)

Following the commented suggestion:

$$S = k\ln W \Rightarrow \Delta_\mathrm{mix}S = k\ln \frac{W_\mathrm{mix}}{W_AW_B} = k\ln W_\mathrm{mix} = k\ln \frac{M!}{N_A!N_B!} \\ = kM [\ln M - x_A\ln N_A - x_B \ln N_B]$$

which is almost correct. If I could divide all logarithmic arguments by $M$, I would get the correct answer.

• If the energy of mixing is zero which you imply in your first equation then you can reach your answer by using the number of distinguishable arrangements of $N_1+N_2$ molecules which is $W_{mix}=(N_1+N_2)!/(N_1!N_2!)$ and $\Delta S=k\ln(W_{mix}/(W_1W_2))$ where $W_1,W_2$ are the numbers for pure components and =1. If its not zero ($w \ne 0$ ) its a really tough problem in regular but non-perfect solution stat mech: :( Oct 20 '16 at 13:51