The total work done on the gas is the sum of these two quantities, or
w = w1 + w2 = piVi − pfVf
It follows that the change of internal energy of the gas as it moves adiabatically from
one side of the barrier to the other is
Uf − Ui = w = piVi − pfVf
Reorganization of this expression gives
Uf + pfVf = Ui + piVi or Hf = Hi
Therefore, the expansion occurs without change of enthalpy