# why do we consider the external pressure when calculating the boundary work

Suppose that there is a piston cylinder device . It contains a gas with pressure P. The external pressure is Pext . In order for the gas to expand , I think that P must be greater than P ext , and it will expand until the pressure of the gas is equal to the external pressure. The thing that I cannot understand is that when we calculate the boundary work we multiply the external pressure by the change in volume. Since the gas is expanding , then the gas is DOING the work ON the surrounding , then I expect that when calculating the boundary work is to consider the gas pressure. What is wrong with that ?

• Please make a drawing. Feb 11, 2017 at 17:32
• Also note as a sanity check... the work to expand a piston against a vacuum is zero. This is of course because the pressure in a vacuum is zero. This doesn't answer your question, Mohammad did that, but it is a sanity check to make sure you have it right. Jan 27, 2019 at 12:42

In case of a Quasi-static expansion, the internal pressure ($P_{in}$) would at all times be just infinitesimally greater than the external pressure($P_{ex}$). Mathematically, $P_{in} = P_{ex} + \text{d}p$. Now work done as you said is, $\int P_{in} \text{d}v$. Therefore, using $P_{in} = P_{ex} + \text{d}p$, then after multiplication inside the integral you would have $\int P_{ex} \text{d}v + \text{d}p\text{d}v$. Since, $\text{d}p$ and $\text{d}v$ are both infinitesimally small, therefore their product can be neglected and you end up with an approximate value of work, which is $\int P_{ex} \text{d}v$.
Work done by a fluid during the process $1 \to 2$ is given by the equation: $$W = -\int\limits_{V_{1}}^{V_{2}} PdV$$ Unless pressure ($P$) varies linearly with volume, this integral can't be solved analytically. So, people make an assumption, they either choose a constant pressure to multiply by the volume change: $$W = -P\int\limits_{V_{1}}^{V_{2}} dV$$ or a constant volume to multiply by the pressure change: $$W = -V\int\limits_{P_{1}}^{P_{2}} dP$$ There's nothing so wrong with assuming that the process takes place at a pressure equal to the external pressure, if the pressure change is much smaller than the volume change, like it usually is when air escapes from a tank.