A vertical, frictionless piston-cylinder device contains a gas that is in equilibrium with the weight of the piston balanced by the internal pressure for the gas.
Suppose the mass of the piston is mpiston, the area of the piston cylinder is Acyl, and the atmospheric pressure outside the cylinder is P atm. Derive a formula for the gas contained in the cylinder Pgas in terms of the given information.