Consider a system with an ideal gas. A process is being carried out in which the gas is being compressed at a constant external pressure $p_\mathrm{ext}$. For this process $\Delta Q$ should be equal to $\Delta H$, but this is where I am stuck.
Work done by the system will be: $$\Delta W=-p_\mathrm{ext}\,\Delta V$$ and $$\Delta H=\Delta U+\Delta(p_\mathrm{sys}V)$$Now we can write: $$\Delta Q=\Delta U-\Delta W=\Delta H-\Delta(p_\mathrm{sys}V)-(-p_\mathrm{ext}\,\Delta V)$$ In this expression $\Delta (p_\mathrm{sys}V)$ and $(p_\mathrm{ext}\,\Delta V)$ are not equal as the process is irreversible and the so the external pressure will remain constant throughout the process but the internal pressure varies. I know that at the initial and final stage the external and internal pressure will be equal as the system will be then at equilibrium with the surrounding but the magnitude of the internal pressure will be equal to the constant external pressure $p_\mathrm{ext}$ only at the final stage. So how will $\Delta Q$ be equal to $\Delta H$ when the process is carried out at constant external pressure?