# Work done by ideal gas

Our textbooks state that work done by the gas is,

$$dW = P_{external}\space dV$$

But why can't it be

$$dW = P_{gas} \space dV$$

Why do we consider the external pressure instead of the pressure of the gas in the container while calculating work done by an ideal gas?

• Work is done ON something. That something is the external pressure. – Floris Jan 27 '17 at 18:23

If the process is irreversible, the pressure of the gas within the cylinder is not uniform, and varies with spatial location. The force per unit area at the piston face (where the work is being done) $\sigma_f$ is also affected by viscous stresses (which are not present if the process is reversible). So, in an irreversible process, the work done by the gas on the surroundings is given by $$W=\int{\sigma_f dV}=\int{P_{ext} dV}$$ where $\sigma_f$ is the compressive stress exerted by the gas at the piston face. This compressive stress includes the thermodynamic pressure $p_f$(evaluated at the local gas specific volume and temperature, as, for example, calculated from the ideal gas law) plus a viscous stress, determined by the local rate of gas deformation in the vicinity of the piston face: $$\sigma_f=p_f+\sigma_{vf}$$Note that, from Newton's 3rd law, the compressive stress $\sigma_f$ exerted by the gas on the piston face is equal to $P_{ext}$, the compressive stress exerted by the piston face on the gas.

If the process is carried out reversibly, then the viscous stresses are negligible, and the thermodynamic pressure is uniform throughout the gas, such that$$\sigma_{vf}=0$$ and $$p_f=p$$where p is determined from the total volume and temperature of the gas, as, for example, from an equation of state such as the ideal gas law. So, for a reversible process, $$\sigma_f=P_{ext}=p$$ and $$W=\int{P_{ext}dV}=\int{pdV}$$ Here is a link to an article I wrote that explains the difference between reversible and irreversible gas expansion (and compression work) in terms of the close analogy to a mechanical spring-damper system: https://www.physicsforums.com/insights/reversible-vs-irreversible-gas-compressionexpansion-work/

Honestly, it does not matter which pressure you consider because work done by the gas is equal to the work done by the external pressure numerically (conservation of energy).

$$W_{ext} = -W_{gas}$$

We consider whichever pressure is most appropriate in a given situation. Consider the following example,

In the following problem, the gas is doing work by pushing the piston (assume outwards). In the process, the pressure of the gas is continuously changing.

Any work that is done by the gas is as good as the work done by the external pressure in the opposite direction (can be negative work).

Let us compare both the ways of calculating work.

Method 1 (using internal pressure): $$dW = P_{gas}\space dV$$

The pressure of the gas is continuously changing, therefore, we would need to obtain a function/equation which describes how the pressure changes with volume to solve the differential equation.

Method 2 (using external pressure): $$dW = P_{ext} \space dV$$

The external pressure is constant in our problem, therefore, the differential equation can be solved easily.

$$\int dW = \int P_{ext} dV$$ $$W = P_{ext} \int dV$$ $$W = P_{ext} \Delta V$$

Note that the work calculated in the two methods yield the same answer numerically (same magnitude) but with different signs.