In a reversible carnot cycle the amount of heat added is always more than the amount of heat taken out. So why doesn't it explode? I'm wondering how heat is conserved mathematically as the area under the curve of a p-v diagram. u=q+w. If the heat during expansion is always more than the heat taken out during compression where does that heat go. Does the temperature going down mean that it lost heat?