<Moderator's note: Moved from a technical forum and thus no template used.> Consider a gas in a closed container with a piston allowed to move. Lets start with a volume of 15 and pressure of 1.5. We add heat to the system, lets say 1200 J. This forces the piston to move increasing the volume to 40. The pressure remains the same, 1.5. When calculating the work done by the gas, how do we go about it? W = P * change in Volume. So, since the pressure remains constant, do we just take change in volume, 15 - 40 = -25? Or 1.5(15-40)? Or add in the heat to the system? (15-40) + 1200?