The entropy change of an ideal gas is calculated as \begin{equation} \Delta S = C_V n\ln(\frac{T}{T_0}) + nR\ln{\frac{V}{V_0}} \end{equation} derived by integrating $dU = TdS – pdV$. It is only true for reversible processes, since we have assumed that the change in heat is $DQ = TdS$. This equation (according to the solution of an exercise) is applied when you have a container with two different gases separated by a wall, and then you suddenly remove the wall and let the two gases mix. The way I see it, this is an irreversible process, yet we apply an equation which we have derived from an assumption only true for reversible processes. This is a rather frequent problem of mine, I see $DQ = TdS$ applied in a lot of exercises where I would have assumed that the process is irreversible. What am I missing here?

# [Physics] Entropy change in mixing two gases

thermodynamics

#### Related Solutions

The ideal gas equation only applies to an ideal gas in a thermodynamic equilibrium state, and not to one that is rapidly deforming. The 2nd equation you wrote applies only to two closely neighboring thermodynamic equilibrium states of a system, and describes the relationship between the differential changes in U, S, and V between these adjacent states. Neither equation describes the intermediate changes along an irreversible path between two widely separated thermodynamic equilibrium states. So how do you determine the change in entropy between these two end states that are connected in practice by an irreversible path?

Step 1: This is the most important step. Completely forget about the actual irreversible path between the two end states. Focus only on the initial and final end states.

Step 2: Devise a reversible path between the two end states. The reversible path you devise does not have to bear any resemblance whatsoever to the actual irreversible path, as long as it starts and ends at the same two end states. A reversible path consists of a continuous sequence of thermodynamic equilibrium states. So, along the path you choose, the system can be no more than slightly removed from thermodynamic equilibrium at every point along the path. There are an infinite number of reversible paths than can take you from state A to state B. So choose one that is convenient for performing step 3.

Step 3: Calculate the integral of dQ/T for the reversible path that you devised in step 2.

When they say that the change in entropy is equal to the integral of $dQ_{rev}/T$, what they mean is that you have to calculate the integral for a reversible path.

You can alternatively use your equation 2 to determine the change in entropy since it automatically implies a reversible path.

By definition of $T$ and $S$, if a system has temperature $T$ and the heat flow into it is $dQ$, its entropy change is always $dS=dQ/T$. And considering the system alone, it is always "reversible". For example, you put it in contact with a reservoir with a higher temperature and let heat flow into it. Later you can put it in contact with a reservoir with lower temperature and let heat flow away from it. Of course if you consider the whole universes the processes are irreversible. For the process to be reversible, you need to put it in contact with a reservoir at the same temperature $T$.

I think you have misinterpreted the meaning of $T$ when the author says $dQ<TdS$. For a system of which the temperature may not even be well defined, if you put it in contact with a reservoir with temperature $T$, and the heat flowing into the system is $dQ$, then we know that $$dS_{system}+dS_{reservoir} > 0$$ for irreversible process.

Then $$dS_{system} > -dS_{reservoir} = -(-dQ)/T=dQ/T$$ $$dQ< T dS$$

Here $T$ is the temperature of the environment (not the system), and $dS$ is the entropy change of the system.

## Best Answer

Entropy is a state variable. That means for every state you have a single value for entropy of that state. So the entropy difference of two states does not depend on the process that takes you from one state to the other. Therefore you can use this formula if the initial state is $(T_0,V_0)$ and final state is $(T,V)$. However the change in the Entropy of universe (system+surrounding) does depend on the process: $\Delta S_{universe}=0$ for reversible process and $\Delta S_{universe}>0$ for irreversible process.