From Piston Force to Pressure-Volume Work
A gas in a cylinder can move a piston by expanding, or have work done on it by compression. The force comes from pressure acting over the piston face. Because the piston moves as the volume changes, the resulting work is naturally expressed in terms of pressure and volume.
The key sign convention is that work done by the gas is positive when the gas expands. During compression, work done by the gas is negative; work done on the gas is then positive. Keeping these two quantities distinct prevents a common sign error.
Deriving the Pressure-Volume Formula
Consider a cylinder with a straight piston whose face has constant area \(A\). Let \(x\) measure the piston’s position in the direction that increases the gas volume. If the gas occupies a length \(x\) of the cylinder, its volume is \(V=Ax\), up to any fixed volume offset. Therefore, a small piston displacement \(dx\) changes the volume by \(dV=A\,dx\).
Pressure is force per unit area. If the pressure exerted by the gas on the piston face is \(P\), the force exerted by the gas has magnitude \(PA\) and points in the direction of increasing volume. The small amount of work done by the gas is force times displacement in that direction. Substituting \(dV=A\,dx\) gives the differential work relation.
If the pressure varies as the piston moves, add the small contributions along the entire process. When the boundary pressure is described by a continuous function \(P(V)\) on the volume interval from \(V_1\) to \(V_2\), the definite integral gives the total work done by the gas. Work done on the gas has the opposite sign.
The integral is signed: its bounds record the direction of the volume change. For positive pressure, expansion has \(V_2>V_1\), so work by the gas is positive. Compression has \(V_2<V_1\), so work by the gas is negative and work on the gas is positive. Pressure must be a boundary pressure appropriate to the process. In a quasistatic process, the gas pressure at the piston can be used as this pressure. If instead the task specifies the work against an external pressure, use that pressure in the work calculation.
Why the Integral Gives Total Work
The formula follows by approximating the piston’s motion with many small displacements. Over a short step, the pressure is nearly constant, so the work by the gas is approximately the pressure at that step multiplied by the small change in volume. Adding these contributions produces a sum of pressure times volume change. As the steps become arbitrarily small, this sum approaches the definite integral.
This also explains why the pressure must be specified along the process, not merely at its endpoints. Different pressure-volume relations between the same starting and ending volumes can give different integrals, and therefore different work.
Worked Examples
Worked Example: Expansion at Constant Pressure
A gas expands in a cylinder with piston area \(0.020\ \text{m}^2\), from \(0.010\ \text{m}^3\) to \(0.025\ \text{m}^3\). The pressure is constant at \(150\ \text{kPa}\). Find the work done by the gas and the work done on the gas.
First convert the pressure to pascals and find the volume change:
Since the pressure is constant, integrate it over the volume interval:
The work done on the gas is the negative of this value:
Check by using the piston displacement. The displacement is \(\Delta x=\Delta V/A=0.015/0.020=0.75\ \text{m}\). The force is \(PA=150{,}000(0.020)=3{,}000\ \text{N}\), so the work is \(3{,}000(0.75)=2{,}250\ \text{J}\), as before. The units also agree: \(\text{Pa}\cdot\text{m}^3=(\text{N}/\text{m}^2)\text{m}^3=\text{N}\cdot\text{m}=\text{J}\).
Worked Example: Expansion with Pressure Inversely Proportional to Volume
Suppose a gas follows the relation \(P(V)=600/V\), where \(V\) is measured in cubic metres and \(P\) in pascals. It expands from \(0.010\ \text{m}^3\) to \(0.030\ \text{m}^3\). Find the work done by the gas.
The pressure-volume constant is \(600\ \text{Pa}\cdot\text{m}^3=600\ \text{J}\). The endpoint pressures are \(P(0.010)=600/0.010=60{,}000\ \text{Pa}\) and \(P(0.030)=600/0.030=20{,}000\ \text{Pa}\). Integrate the given pressure relation:
Numerically, \(600\ln 3\approx659.2\ \text{J}\). Since this is an expansion, the positive sign is consistent with the convention. Work done on the gas is \(-600\ln 3\ \text{J}\), approximately \(-659.2\ \text{J}\).
Check the antiderivative: the derivative of \(600\ln V\) with respect to \(V\) is \(600/V\), exactly the given pressure. The result has units of joules because the factor \(600\) has units \(\text{Pa}\cdot\text{m}^3\), while the logarithm is dimensionless as a ratio of volumes.
Worked Example: Compression with Linearly Varying Pressure
During compression, the pressure is described by \(P(V)=160{,}000-2.00\times10^6V\), with \(V\) in cubic metres and \(P\) in pascals. The volume decreases from \(0.020\ \text{m}^3\) to \(0.010\ \text{m}^3\). Find the work done by the gas and the work done on the gas.
Check the pressures at the endpoints:
The pressure is positive throughout the interval and rises as the volume decreases. An antiderivative of \(P(V)\) is \(F(V)=160{,}000V-1.00\times10^6V^2\). Evaluate it at both bounds, retaining the compression order \(0.020\) to \(0.010\):
Therefore, \(W_{\text{on}}=-W_{\text{by}}=1{,}300\ \text{J}\). Check by differentiating the antiderivative: \(F'(V)=160{,}000-2.00\times10^6V=P(V)\). The negative work by the gas is appropriate because the volume decreases; the positive work on the gas has the expected sign.
Sign Convention and Common Pitfall
A reliable way to track signs is to keep the initial and final volumes in their actual order in the integral. Do not rearrange the bounds merely to make them increasing. If you reverse them, the integral changes sign, so the result no longer represents work by the gas for the stated process.
Another potential confusion is whether to use the pressure of the gas or the pressure of the surroundings. The work done by the gas at its boundary uses the pressure exerted by the gas there. A problem asking for work against an external pressure calls for that specified external pressure. In quasistatic equilibrium these pressures agree; otherwise, keep the physical quantity in the question clear.
Using the Model Carefully
Before integrating, identify the process direction and the pressure relation that applies over the entire interval. Then preserve the given units consistently: pressure in pascals and volume in cubic metres produce work in joules. If the pressure is constant, the integral reduces to pressure multiplied by the signed volume change. If pressure varies, use the stated function and evaluate its definite integral with the actual starting and ending volumes.
Use the pressure specified for the gas at the moving piston, or the external pressure if the requested quantity is work against the surroundings.
Write \(V_1\) as the lower-limit position in time and \(V_2\) as the upper-limit position in time, even when \(V_2<V_1\).
Compute \(W_{\text{by}}=\int_{V_1}^{V_2}P(V)\,dV\); negate it to obtain work done on the gas.
Verify the antiderivative, units, and sign against whether the gas expanded or was compressed.
Check Your Understanding
Use the pressure-volume work convention from this tutorial to answer the following questions.
- Why does a piston of area \(A\) moving by \(dx\) produce a volume change \(dV=A\,dx\)?
- A gas expands under constant positive pressure. What are the signs of work done by the gas and work done on the gas?
- For \(P(V)=k/V\), what antiderivative should be used to calculate work, and what condition on \(V\) is needed?
- During compression, why must the limits in the work-by-the-gas integral be written from the larger initial volume to the smaller final volume?
- What information about the process is needed to determine pressure-volume work when pressure is not constant?