# How can we say that p in ΔU= q_p-pΔV and p in ΔH=ΔU+pΔV are equal? About the derivation of ΔH=q_p

I was studying about thermodynamics and everything was fine until I studied about enthalpy $$H$$. The first thing I wanna know is what is $$p$$ in eq. $$H=U+pV$$. Is it internal pressure or external pressure? Since $$p_\text{in}$$ and $$p_\text{ext}$$ are not necessary to be same and it is important to distinguish both. At constant pressure we get $$\mathrm dH=\mathrm dU+p\,\mathrm dV$$ (eq. 1)

Another eq. we know at constant pressure is that , $$q_p=\mathrm dU+p\,\mathrm dV$$ (eq. 2). I know that this pressure should be external pressure but I am not sure. We derived $$q_p=\mathrm dH$$ (eq. 3) thinking $$p$$ used in both eq. is same.

I have read somewhere that $$p$$ in eq. 2 is external pressure. And $$pV$$ in eq. 1 tells the energy required to estabilish system. So I thought that this pressure would be internal pressure. If this is true then $$p$$ in both equations eq.1 and eq. 2 would be different and the eq. 3 would get wrong.

So clear my confusion. I am totally confused to say if both are external pressure or internal. We can't use internal pressure in eq. 2. So $$p$$ should be external pressure. But on the other hand $$p_\text{ext}V$$ in eq. 1 looks wrong.

You should distinguish between equilibrium states of the system and transitions (processes) between these equilibrium states. Heat and work are exchanged during the transitions and are not equilibrium properties of the system, they are properties of the transition.

When in an equilibrium state (the endpoint of a transition), and when the system is subject to an external pressure, then the internal pressure of the system and applied pressure are the same: $$p=p_{\mathrm{ext}}$$. This condition is called mechanical equilibrium. When the system undergoes a transition for which the initial and final states have equal pressure, then if the system allows heat exchange with surroundings $$\Delta U = -p \Delta V + q_p$$ and $$\Delta H = \Delta U+ p \Delta V = q_p$$, assuming also that only pressure-volume work is done. Here $$p$$ is equal to the pressure of the system and surroundings, since the system and surroundings are in mechanical equilibrium.

Edit: Reversibility is also a property of processes, not of systems. For a process to be reversible the system and surroundings have to be in equilibrium throughout. That also includes satisfying the condition of mechanical equilibrium ($$p=p_{\mathrm{ext}}$$).

When considering an irreversible compression the initial equilibrium pressure is $$p=p_{\mathrm{ext,initial}}$$ and the final equilibrium pressure is $$p=p_{\mathrm{ext,final}}$$, where $$p$$ refers to the pressure of the system. To trigger compression the initial equilibrium condition is broken and the external (applied) pressure is increased above that of the system, from $$p_{\mathrm{ext,initial}}$$ to $$p_{\mathrm{ext,final}}>p_{\mathrm{ext,initial}}$$. The condition of constant $$p$$ of the system is not satisfied for the case of a compression against a constant external pressure since there is a change going from the initial to final equilibrium pressure. The external pressure is constant, not that of the system. The condition $$\Delta H = q_p$$ does not hold, and the change in enthalpy is given more generally by $$\Delta H = \Delta U +p_2V_2 - p_1V_1$$.