Why change in Gibbs free energy of mixing is not zero? I can't understand why change in Gibbs free energy must be zero when two ideal gases mix. The differential of $G$ is: $$dG=-SdT + Vdp + \sum_i\mu_idn_i$$ When two ideal gases mix and they are initially at same $T$ and $P$ that is $T_1=T_2=T$ and $P_1=P_2=P$ then the final state will have also same $T$ and $P$. Why we can't say $ΔG=\int dG=0$ ?
 A: I think I found the solution. The problem arises because initially I thought of pressure and temperature of an isolated system to behave the same as the extensive variables (energy, entropy etc). The mixing of system of two ideal gases assuming the system is isolated from the surroundings means that final temperature and pressure would be the same with their initial values. BUT the corresponding changes in partials pressures isn't necessary to be the same. It would be non sense to say $dp=0$ (indepedently of the fact that both parts of the container have the same pressure) because initially we have a system with two partitions.
Let A be the gas in partition A and B the gas in partition B. It follows that:
$$dG_a=-S_adT_a + V_adp_a=dH_a-TdS_a$$
$$dG_b=-S_bdT_b+ V_bdp_b=dH_b-Tds_b$$
and $$G=G_a+G_b \Rightarrow dG=dG_a + dG_b$$
Because the gases are ideal and before and after the mixing both gases have the same temperature then: $$dH_a=dH_b=dH=0$$ so $$dG=-T(dS_a + dS_b) $$ or $$\Delta G_{mix}=-T\Delta S_{mix}$$ which is negative because gases are free to take more volume therefore increasing their entropy.
A: You might think Ideal solutions don't react thus having a zero Gibbs free energy. But you are forgetting about the Van der Waals forces.
A•••A     B•••B  ------>  A•••B
Ideal solution form van der waals forces which means the vanderwaals between A•••A & B•••B breaks and new vanderwaals are forming between A•••B. So, the reaction is Spontaneous thus change in Gibbs free energy negative. Since we are adding two different solution together , the disorderness increase making Entropy Positive.
And because they are just forming weak van der waals forces change in enthalpy will be 0 zero
