# Work done by gas

suli
if gas in a container expands against a constant external pressure,
the work done by it is Pexternal*dV.
but the force is generated inside the container, shouldn't we use Pgas to calculate the answer?

$$W = \int p dV$$ over the range from v1 to v2 and p would be the internal pressure.