Piston in thermal contact with heat reservoir problem