# What will happen to the entropy and free energy of the gasses when the partition is removed?

Consider a container of volume $5.0$ L that is divided into two compartments of equal size. In the left compartment there is nitrogen at $1.0$ $atm$ and $25 °C$; in the right compartment there is hydrogen at the same temperature and pressure. What will happen when the partition is removed?

$A)$The entropy decreases, and the free energy decreases.
$B)$ The entropy increases, and the free energy decreases.
$C)$The entropy increases, and the free energy increases.
$D)$The entropy decreases, and the free energy increases.

Logic tells that upon removing the partition, randomness increases and hence entropy increases. I am confused about free energy. First law of thermodynamics has to be applied , I think. But I can't seem to get the right direction.

A Spontaneous process is characterized by an increase in the total entropy (for both system and surroundings).

Spontaneous processes are characterized by a decrease in free energy (analogous to the decrease in gravitational potential energy occurring for a ball rolling downhill).

We know that free energy of a process is given by:

$$\Delta G_\mathrm{mix} = \Delta H_\mathrm{mix} - T \Delta S_\mathrm{mix}$$

The molar entropy of mixing is given by:

$$\Delta S_\mathrm{mix} = -R(x_\ce{A}\ln(x_\ce{A}) + x_\ce{B}\ln(x_\ce{B}))$$

For an ideal gas: $$\Delta H_\mathrm{mix} = 0$$ giving free energy as:

$$\Delta G_\mathrm{mix} = -T\Delta S_\mathrm{mix} = RT(x_\ce{A}\ln(x_\ce{A}) + x_\ce{B}\ln(x_\ce{B}))$$

since $$x_\ce{A}$$ and $$x_\ce{B}$$ are mole fractions ($$x_i \le 1$$), the natural log will always yield a negative number. Therefore the entropy will be positive and the free energy will be negative.