# Consideration on the total entropy variation for 2 ideal gases

Let's consider an isolated container containing a mole of an ideal monoatomic gas $A$ and a mole of a biatomic gas $B$, separated by an ideal piston (hermetic). The gases slowly exchanges heat and the piston slides (no friction). At the very beginning it is given the volume of $A$ ($V_{A,0}=V_0$), the temperature of $A$ ($T_{A,0}=T_0$) and the volume of $B$ ($V_{B,0}=3V_0$).

Three questions:

1. Which are the final states of the gases ($(p_A, V_A, T_A)$ and $(p_B, V_B, T_B)$)?
2. Which are the entropy variations of the gases ($\Delta S_A$ and $\Delta S_B$)?
3. What can you say about the sum of the two entropy my variation?

My approach

At final state, the gases will reach both thermal and dynamical equilibria. This means that:

$$T_A = T_B = T ~\text{and}~p_A = p_B = p.$$

As a consequence:

$$V_A = V_B = V.$$

Since the system is isolated, then the total volume is constant over time. This implies that:

$$V_A + V_B = V_{A,0} + V_{B,0} = 4V_0 \Rightarrow V = 2V_0.$$

The entropy variations are:

$$\Delta S_A = R \log \frac{V_A}{V_{A,0}} + \frac{3}{2}R\log \frac{T_A}{T_{A,0}} = \\ =R \log 2 + \frac{3}{2}R\log \frac{T}{T_{0}}$$

and

$$\Delta S_B = R \log \frac{V_B}{V_{B,0}} + \frac{5}{2}R\log \frac{T_B}{T_{B,0}} = \\ =-R \log 2 + \frac{5}{2}R\log \frac{T}{T_{B,0}}.$$

The sum of the entropy variations is $0$ since the system is isolated (is this true???).

Then $\Delta S_A + \Delta S_B = 0$ implies that:

$$3\log \frac{T}{T_{0}} + 5\log \frac{T}{T_{B,0}} = 0 \Rightarrow \\ \log \frac{T^3}{T^3_{0}} + \log \frac{T^5}{T^5_{B,0}} = 0 \Rightarrow \\ \log \frac{T^8}{T^3_{0}T^5_{B,0}} = 0 \Rightarrow \\ \frac{T^8}{T^3_{0}T^5_{B,0}} = 1,$$

yielding to

$$T = T_0^{\frac{3}{8}} T_{B,0}^{\frac{5}{8}}.$$

Are all the reasonings I wrote here right?

"The sum of the entropy variations is 00 since the system is isolated". If by entropy variation you mean total change in entropy (as you do indeed), then it is not true. Equalization of temperature and pressure have taken place, which are irreversible processes. So entropy has increased and reached a maximum value consistent with constraints on your system (constraints are that total internal energy and total volume of the system remain constant). Read this excellent book (if you haven't already): $\textit{Thermodynamics}$ by Herbert Callen.
You can find final temperature by knowing equation of state for the two gases and using $U_{total, intial}=U_{total, final}$.