Mixing identical gases in different states (Gibbs paradox) Background
It is well known that if we take a container separated into two volumes $V_1$ and $V_2$ by an insulating membrane and containing some moles $n_1$ and $n_2$ of the same gas at the same temperature $T$ and pressure $P$, then removing the membrane doesn't produce any change in entropy. Intuitively we can explain this by taking into account the fact that the particles are not distinguishable, so putting the membrane back is a reversible process, while classically we would have an increase of entropy (Gibbs paradox).
Question
I am trying to understand what happens if we have the same situation with identical gases but they are in two different states now, namely $n_1 \neq n_2$, $ P_1 \neq P_2$ and $T_1 \neq T_2$. What would be the change in entropy when removing the membrane?
My attempt
My attempt would be to compute the classical change in entropy using the formula
$$
\Delta S_{tot} = \Delta S_A + \Delta S_B = nR\log\Big(\frac{V_f}{V_i}\Big) + nc_v\log\Big(\frac{T_f}{T_i}\Big)
$$
for both gases and then subtract the error made by not taking into account that the particles are not distinguishable: for this, I would take the final state and imagine to insert a membrane, then compute the entropy when mixing back the two gases just by using the classical (wrong) reasoning with distinguishable particles and subtract this amount.
Are there any flaws in my reasoning? Would this work? Thanks!
 A: Yes, it works without any problems. I’ll just add that you can do it all in one go by modifying the expression of your entropy:
$$
S =nc_v\ln(T/T_0)+nR\ln\left(\frac{V/n}{ V_0/n_0}\right)+ns_0
$$
with a reference state being marked $0$. The initial entropy is the sum of the entropies of the two systems with $n_1,n_2$ and the final is with $n$. It is mathematically equivalent but you don’t need to single out the entropy variation due to mixing.
This new form of entropy is generally preferable as it is extensive and solves Gibb’s paradox. It isn’t incompatible with your expression, because yours was derived assuming a fixed $n$, so it is defined up to an additive function of $n$. Furthermore, you can derive this new formula from statistical mechanics, and is more closely related to what chemists use in real life. Hope this helps and tell me if you find some mistakes.
A: I would do this entirely differently.  First I would calculate the final temperature and the final pressure.  Then, I would calculate the entropy change from $$\Delta S=n_1[C_p\ln{(T_f/T_1)}-R\ln{(P_f/P_1)}]+n_2[C_p\ln{(T_f/T_2)}-R\ln{(P_f/P_2)}]$$This seems much simpler to me.
