An ideal gas undergoes a quasi-static