# Why do we use the external pressure to calculate the work done by gas

I read in a textbook that in the case when we have a gas in a cylinder fitted with a massless frictionless piston being held with an external pressure $$p_1$$, and when the pressure is reduced to become the value $$p_2$$, the gas pushes up against the piston and then the work done by the gas for a small change in volume is calculated by:

$$\mathrm dW=p_2\,\mathrm dV$$

Here, is what I don't conceptually understand. If the gas's molecules was under some pressure $$p_1$$ which is equal to the external pressure in the static state then after the external pressure became lower than the internal pressure, shouldn't the work done by the gas be the difference between the two pressures?

If the piston is frictonless and massless, then, if you do a force balance on the piston, you must have that the force per unit area that the gas exerts on the inside face of the piston will always be equal to the external force per unit area that one imposes on the outside face of the piston. The sudden drop in pressure on the outside face of the piston causes the gas to undergo an irreversible expansion. During an irreversible expansion, the local pressure within the cylinder becomes non-uniform, so that the average pressure of the gas differs from the force per unit area at the piston face. As a result, the ideal gas law (or other equation of state) cannot be applied globally to the gas in the cylinder. In addition, during an irreversible expansion, there are viscous stresses present in the gas that allow the force per unit area at the piston face to drop to the new lower value while requiring that force to match the external force on the outer face. So the work done by the gas on the piston is equal to the external force per unit area times the change in volume: $$W = \int{P_{ext}dV}$$ This equation is always satisfied, irrespective of whether the expansion is reversible or irreversible.

• Is perfect gas viscous? – The99sLearner Feb 1 at 18:21

The derivation of pressure-volume work is as follows, in reverse:

$W = P\Delta V$

$P = F/A$

$\Delta V = A\Delta d$

Subbing those last two into the first:

$W = (F/A) (A\Delta d)$

Or:

$W = F \Delta d$ which is the definition of work.

So, the work done by the gas in the cylinder is indeed independent of the outside pressure, it is a function of the force exerted by the gas and the displacement of the piston. But, the work done on the piston is different. It is the sum of the work done by the gas inside and that done by the gas outside. The gas outside is exerting a force inward while the distance moved by the piston is outward so that work is negative compared to the positive work done by the gas inside the cylinder. So the gretaer the difference between inside and outside pressure, the greater the net work done on the piston. But still, the work done by only the inside gas on the piston is a function of its pressure and the $\Delta V$.