# Entropy Change for a Thermally Isolated System

Clausius' Theorem states that $\int\frac{dQ}{T}\leq0$ for a closed cycle, with equality for a reversible cycle. Suppose we wish to take our system around a closed cycle such that the path from A to B is irreversible and the path from B back to A is reversible. Then we can break the integral up and write $\int_A^B\frac{dQ}{T}+\int_B^A\frac{dQ_{rev}}{T}\leq0$, or in other words $\int_A^B\frac{dQ}{T}\leq\int_A^B\frac{dQ_{rev}}{T}$. When A and B get very close, we have $\frac{dQ}{T}\leq\frac{dQ_{rev}}{T}$ or using the thermodynamic definition of entropy, $dS\geq\frac{dQ}{T}$.

Now I can repeat the proof but with A to B being reversible and B back to A being irreversible. Then in the above we just swap any $Q$ with $Q_{rev}$ and vice versa, but this leads to $dS\leq\frac{dQ}{T}$ which is incorrect. Where is the flaw in this argument?

The flaw is that the equations does not actually change signs. The equation is symmetrical in the sense that both the reversible and the irreversible contribute to the inequality in the same way: adding up.Once you define that the reversible process is the one from A to B instead of B from A, you still have $dS=\frac{dQ_{rev}}{T}$, the only change is that the limits of the integral go from B to A, instead of from A to B.