# Why is the work done by an expanding ideal gas $\textbf{P}_{ext}\Delta V$?

Consider an ideal gas in a cubical container as our system (only the gas is the system, not the walls of the container). If I understand correctly, if the gas expands at constant pressure $$P_{int}$$ greater than the ambient pressure $$P_{ext}$$ (after heating the gas to a certain temperature, the walls of the container, which we'll assume undergoes plastic deformation, can no longer provide a pressure whose sum with the atmospheric pressure counteracts the pressure of the gas, and the gas starts expanding such that as the volume gets scaled by some factor, the temperature gets scaled by that same factor, allowing for expansion at constant pressure $$P_{int} > P_{ext}$$), the work done by the gas should be

$$W = \int{\textbf{F}}d\textbf{s} = \int{\frac{\textbf{F}}{A} Ad\textbf{s}} = \int{\textbf{P}_{int}dV} = \textbf{P}_{int} \int{dV} = \textbf{P}_{int}\Delta V .$$

But this Khan Academy article says that the work done by the expanding (or shrinking) gas is

$$W = \textbf{P}_{ext}\Delta V,$$

and, now that I think about it, shouldn't the net work be the difference in works done by the system (gas) and the surroundings, making the correct expression

$$W = \int{(\textbf{P}_{int} - \textbf{P}_{ext})}dV = (\textbf{P}_{int} - \textbf{P}_{ext}) \Delta V ?$$

Also, assuming the first expression is true, does this mean that, for an ideal gas, $$\textbf{P}V (=NkT=nRT=\textbf{P}\Delta V$$ where $$V_i=0)$$ is the work required to "make room" for the gas (enthalpy minus internal energy) only if the greater interior pressure was a constant function of volume and temperature during the expansion from zero volume, and this is what makes work path-dependent and not a state function? (If the interior pressure was a non-constant function of volume dring the expansion from zero volume, work would be given by a line integral, correct?)

• You need to distinguish what the gas is doing work on. If it’s the container walls, the pressure imbalance must be accelerating them (and possibly storing strain energy). In this way, more work is done by the gas on the container and surroundings than by the gas and container on the surroundings. This resolves the discrepancy. Commented Feb 29 at 17:55
• In an rapid irreversible expansion, do you think that the gas satisfies the ideal gas law? Commented Feb 29 at 18:02
• @Chemomechanics I'm only considering the gas as the system, so it's doing work on the container and beyond, so $P_{ext}$ is the sum of atmosheric pressure and pressure due to walls of container. If $P_{int}>P_{ext}|$, the walls will expand as you say, but why is the work done by the gas $P_{ext}\Delta V$ and not $P_{int}\Delta V$? Commented Feb 29 at 18:24
• When you say the internal pressure is constant, do you mean throughout the gas or just where it contacts the walls. Commented Feb 29 at 19:11
• The constant internal pressure premise seems implausible to me. Assuming elastic (Hookean) deformation of the walls you would need to keep increasing the internal pressure to continue to expand the walls Commented Feb 29 at 20:22

Word done by the gas on the piston (or deformable wall) is $$p_{int} \Delta V$$, and work done by the piston on the outside atmosphere of pressure $$p_{ext}$$ is $$p_{ext}\Delta V$$.

The difference $$(p_{int} - p_{ext})\Delta V$$ is the net work done by gas from both sides on the piston.

• Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on Physics Meta, or in Physics Chat. Comments continuing discussion may be removed.
– Buzz
Commented Mar 3 at 17:11

Assuming it is even possible to deform a material at constant pressure (which I doubt as a material generally undergoes elastic prior to plastic deformation), the work done by the gas on the container is $$P_{int}\Delta V$$ and the work done by the constant external pressure on the container is $$-P_{ext}\Delta V$$.

Thus the net work done on the container is the sum of two, or $$(P_{int}-P_{ext})\Delta V$$.

Hope this helps.

• This makes sense. One more thing: if the container itself was part of the surroundings (and system was only the gas), the work done by the surroundings on the gas $P_{surroundings}\Delta V$ would still be less than $P_{system}\Delta V$, since the system is expanding (meaning $P_{system}>P_{surroundings}$), correct? Commented Mar 1 at 9:46
• @cloud If the gas is the system then the container is the part of the surroundings that interacts directly with the system. Per Newton’s 3rd law the pressure the container exerts on the gas is equal and opposite to the pressure the gas exerts on the container, i.e. $P_{int}$. Commented Mar 1 at 14:23
• We say the system does positive work of $P_{int}\Delta V$ on the container since the force the gas exerts on the container is in the direction of the displacement of the container. When something does positive work on something else it transfers energy to that something else. Commented Mar 1 at 14:23
• But it is completely analogous to say the container is doing negative work of $-P_{int}\Delta V$ on the gas. When something does negative work on something else it takes energy away from that something else. In the case, the container takes energy away from the gas. Commented Mar 1 at 14:23
• The same applies when we look at the interaction of the container with its constant pressure environment, say, atmospheric air. Only now the equal and opposite pressure is $P_{ext}$ and is the basis of the work done on/by the container by/on the atmosphere Commented Mar 1 at 14:24