Solve the below problem:
Q: A cylinder with a frictionless piston contains steam at 2 MPa, 500?C with a volume of 5 L. The external piston force is proportional to cylinder volume cubed. Heat is transferred out of the cylinder, reducing the volume and thus the force until the cylinder pressure has dropped to 500 kPa. Find the work and heat transfer for this process.