Solve the below:
Q: A frictionless piston-cylinder device initially contains air at 200 kPa and 0.2 m3. At this state, a linear spring (F = x) is touching the piston but exerts no force on it. The air is now heated to a final state of 0.5 m3 and 800 kPa. Determine
(a) The total work done by the air and
(b) The work done against the spring. Also, show the process on a P-v diagram.