By Carnot theorem, we have η η = W ˙ ˙ Q ˙ ˙ H ≤ ≤ 1 − − T L ′ T H ′ . This then gives us a problem of constraint optimization: { max T H ′ , T L ′ W ˙ ˙ W ˙ ˙ Q ˙ ˙ H ≤ ≤ 1 − − T L ′ T H ′ This can be solved by typical methods, such as Lagrange multipliers, giving us T H ′ = x T H ; T L ′ = x T L ; x = k H T H + k L T L k H + k L at which point the engine is operating at efficiency η η = 1 − − T L T H .