Consider a gas as your system, confined in the usual frictionless piston-cylinder. The piston is massless, external pressure is constant, Pext. Let the system be at initial state T1 and P1 = Pext. We want to compare the following two processes: in the first process, we reversibly heat the gas against constant external pressure to final volume V2. In the second process, we heat the gas irreversibly from the same initial conditions against the same constant pressure to reach the same final volume V2, and then we wait for the gas to reach internal equilibrium, so that P2= Pext and both the initial and final states of the two process are identical. Assuming the gas has constant Cp over the temperature range, we wish to compare qrev and qirrev for the two processes, and also ∆S for the two processes. Now here's the contradiction: ∆S should be equal for the two processes, since the initial and final states are the same. So let's calculate ∆S for the reversible process. Since it is reversible, we have ∆S = ∫dqrev/T, where dqrev = CpdT. So ∆S = Cp Ln T2/T1. This is also ∆S for the irreversible process. Also qrev must equal qirrev since both are constant pressure processes, with ∆H, ∆U, W and q all being equal for both processes, right? But what if we consider the inequality dS>dqirrev/T? If we use dqirrev=dqrev= CpdT, then we have ∆S>Cp Ln T2/T1, which contradicts our previous finding. Where have I gone wrong?