Now let us calculate the performance of a Carnot cycle, using one mole of ideal gas as work substance and with only PV work.

We write the equation of the first law: \begin{equation} dU=dq+dw=dq-pdV \end{equation} For an ideal gas it is true that: \begin{equation} dU=C_vdT\;\;y\;\ ;P=\frac{nRT}{V} \end{equation} Substituting into the first law: \begin{equation} C_vdT=dq-\frac{nRT}{V}dV \end{equation} Dividing the entire equation by T \begin{equation} \frac{C_v}{T}dT=\frac{dq}{T}-nR\frac{dV}{V} \end{equation} Integrating over the Carnot cycle \begin{equation} \oint C_v\frac{dT}{T}=\oint\frac{dq}{T}-nR\oint\frac{dV}{V} \end{equation} The integrals $\oint C_v\frac{dT} {T}$ and $\oint\frac{dV}{V}$ are zero since the integrands are differentials of state functions and the integral over one cycle is zero.

Therefore, the equality becomes: \begin{equation} \oint \frac{dq}{q}=0 \end{equation} valid expression for a Carnot cycle operating with an ideal gas. Writing the four terms of the integral (one for each stage of the Carnot cycle). \begin{equation} \oint\frac{dq}{q}=\oint_{1}^{2}\frac{dq}{T}+\oint_{2}^{3}\frac{dq}{T }+\oint_{3}^{4}\frac{dq}{T}+\oint_{4}^{1}\frac{dq}{T} \end{equation} The adiabatic stages ($2\rightarrow 3 $ and $4\rightarrow 1$) have $dq=0$ and the integrals corresponding to these stages are zero. The isothermal stages work at temperatures $T_F$ and $T_c$, exchanging heat $q_F$ and $q_c$ with the environment, respectively.

Therefore: \begin{equation} \oint\frac{dq}{q}=0=\frac{q_c}{T_c}+\frac{q_F}{T_F} \end{equation} Solving for: \begin{equation} \frac{q_F}{q_c}=\frac{T_c}{T_F} \end{equation} Substituting into the expression calculated above for the performance in the Carnot cycle. \begin{equation} e=1-\frac{q_F}{q_c}=1-\frac{T_F}{T_c} \end{equation} This expression gives us the efficiency of a reversible heat engine operating between two temperatures $T_C $ (hot spot) $T_F$ (cold spot). As can be seen, the performance only depends on the temperature difference between the two sources and approaches 1 when $T_F$ is smaller and $T_C$ is larger.

A reversible machine does not exist in reality, all machines work with some irreversibility, therefore, the Carnot cycle represents a maximum performance limit that cannot be exceeded by any real machine.