Let me put this another way. Let us say that we are helping push down by hand a piston that is waiting to decompress (like a spring). The piston would go X meters. What I don't understand is from the initial position to X/2meters (the piston having traveled half of its total distance), the expressions "w=-pv" and "w=-fd" do not give the same results (even after converting units). The problem is that the force generated by the gas is continually declining; it decreases as the piston gets pushed further. On the contrary, the pressure of the atmosphere is constant. If we use the expression "w=-pv", then the energy released from initial position to X/2 is the same as that released when the piston moves from X/2 to X. This is not the case when we use "w=-fd". The forces involved through the first half of the distance are greater than those involved in the second half are, since force is constantly decreasing as the volume gets larger. Am I making any faulty assumptions?