Solution (source code)

= Solution

Macroscopically, an <adiabatic process> exchanges no <heat> with its surroundings: $\delta Q=0$. A reversible adiabatic process is therefore <isentropic process>[isentropic], since $dS=\delta Q_{\rm rev}/T=0$. Microscopically, the system is thermally isolated, so changes in its energy arise from work done by changing external parameters rather than random energy exchange with a <heat bath>; in a sufficiently slow change, the populations of the corresponding microscopic states are carried along without producing entropy.

For repeated operation the working substance must execute a <thermodynamic cycle>. Reversible isothermal contact at $T_2$ absorbs heat $Q_2$, a reversible adiabat changes the temperature to $T_1$, reversible isothermal contact at $T_1$ rejects heat $Q_1>0$, and a second adiabat returns to the initial state. This is the <Carnot cycle>. Reversibility and zero net entropy change give
$$
\frac{Q_2}{T_2}-\frac{Q_1}{T_1}=0,
\qquad
\frac{Q_1}{Q_2}=\frac{T_1}{T_2}.
$$
The <thermal efficiency> is the net work output divided by the absorbed heat:
$$
\eta=\frac{W}{Q_2}=\frac{Q_2-Q_1}{Q_2}.
$$
Consequently
$$
\boxed{\eta_{\max}=1-\frac{T_1}{T_2}.}
$$
The <Carnot theorem> shows that any irreversible cycle has smaller efficiency, so the two isotherms joined by two adiabats are optimal.