# Deriving $Q_{1}-Q_{2}=W$ for a perfect gas that had gone through a Carnot cycle

I saw multiple times that if an engine, say Carnot engine, absorbs heat $$Q_{1}$$ at $$T_{1}$$, does work $$W$$, and expels heat $$Q_{2}$$ at $$T_{2}$$, then we should have$$\tag{1}Q_{1}-Q_{2}=W.$$

Let us say we have a perfect gas within a cylinder+piston going through a Carnot cycle. Initially, the internal energy is $$U$$, and its temperature $$T_1$$. $$\\$$

• Step 1— Isothermal expansion: An amount of heat $$Q_1$$ is injected into the gas at $$T_1$$, and an amount of work $$W_1$$ is done on the surroundings. Furthermore, since we are working with a perfect gas, the internal energy is a function of temperature only. Therefore, since the process is isothermal, the internal energy stays the same, and we have $$Q_1 = W_1$$. Labeling the internal energy at the end of this process $$U_1$$, we have $$U_1 = U$$.

$$\\$$

• Step 2— Adiabatic expansion: The gas does work $$W$$ on its surroundings, its temperature drops from $$T_1$$ to $$T_2$$. The internal energy at the end of this process is $$U_2 = U-W$$.

$$\\$$

• Step 3— Isothermal compression: We do an amount of work $$W_2$$ on the gas. The gas releases an amount $$Q_2$$ of heat. The isothermal process and the gas's being perfect imply $$Q_2 = W_2$$. $$U_3 = U_2 = U - W$$.

$$\\$$

• Step 4— Adiabatic compression: We an amount of work $$W_3$$ on the gas. It's temperature rises to $$T_1$$. The internal energy after this final process is $$U_4 = U_3 + W_3 = U-W+W_3$$.

Now, since we want to have a cyclic process, and we want the gas to be restored to its initial state, we must have $$U_4 = U$$. Thus, $$U-W+W_3 =U,$$ or $$W_3 = W.$$

So the only condition to have a cyclic process is to reinject the same amount of work that was lost during the adiabatic expansion.

How did equation $$(1)$$ come into being then? It seems to me that $$Q_{1}$$, $$Q_2$$, and $$W$$ are completely independent from each other, aren't they?

It would be very helpful if one could provide an answer without using the concept of entropy, I didn't go through this concept yet.

I haven't the time to check each of your steps at the moment, but there is no change in internal energy in either isothermal process. The decrease in internal energy during the adiabatic expansion exactly equals the increase in internal energy in the adiabatic compression which completes the cycle so that $$\Delta U_{cycle}=0$$. The net work done is the heat added during the isothermal expansion minus the heat rejected during the isothermal compression, or $$Q_{1}-Q_{2}$$.
• I think I understand my mistake now. I thought since the beginning that $Q_{1}-Q_2$ was the work done during the adiabatic expansion only, instead of the net work. Thanks! Jan 11 '20 at 23:38
• @Hilbert As you yourself pointed out, $Q_1$ is the work done by the gas in the isothermal expansion (step 1) and $-Q_2$ the work done on the gas in the isothermal compression (step 2). The expansion work done in the adiabatic expansion exactly equals the compression work in the adiabatic compression, thus they cancel each other out. That leaves the net work done as $Q_{1}-Q_2$. Glad it helped you. Jan 11 '20 at 23:44
Here is an alternative answer. For the entire cycle, the change in internal energy of the working fluid is zero (since the final state is the same as the initial state). So, $$\Delta U = 0 = Q-W$$where Q is the net heat absorbed by the working fluid during the cycle and W is the net work done by the working fluid during the cycle. But since steps 2 and 4 are adiabatic, $$Q=Q_1+Q_3=Q_H-Q_C$$So, $$W=Q_H-Q_C$$