4. (15 points) Identical gases are in two thermally insulated vessels with volumes $V_{1}=1$ l and $V_{2}=2$ l. The pressures of the gases are $p_{1}=2$ atm and $p_{2}=3$ atm, and their temperatures are $T_{1}=300$ K and $T_{2}=400$ K, respectively. The gases are mixed. Determine the temperature that will be established in the vessels.
Answer $\approx \approx 369$ K.

Solution. The total internal energy of the gases before mixing is equal to the total internal energy after mixing $U_{1}+U_{2}=U$, then $\frac{i}{2} \vartheta_{1} R T_{1}+\frac{i}{2} \vartheta_{2} R T_{2}=\frac{i}{2}\left(\vartheta_{1}+\vartheta_{2}\right) R T$, where $\vartheta_{1}=\frac{p_{1} V_{1}}{R T_{1}}, \vartheta_{2}=\frac{p_{2} V_{2}}{R T_{2}}$. In the end, we get $T=\frac{p_{1} V_{1}+p_{2} V_{2}}{\frac{p_{1} V_{1}}{T_{1}}+\frac{p_{2} V_{2}}{T_{2}}} \approx 369 \mathrm{~K}$.