A cylinder fitted with a frictionless piston contains R-134a at 100 F, 80% quality, at which point the volume is 3 Gal. The external force on the piston is now varied in such a manner that the R-134a slowly expands in a polytropic process to 50 lbf / in ^{2}, 80 F. Calculate the work and the heat transfer for this process.