The exergy of the system is the maximal amount of useful work that the system can generate, during a process which brings it to equilibrium with its environment, or the amount of energy available. During an irreversible process, such as heat exchanges with reservoirs, exergy is destroyed. Generally, the theorem states thatwhere  is the rate at which exergy is destroyed, and  is the rate at which entropy is generated. As above, time derivatives are denoted by dots. 
Unlike the lost work formulation, this version of the theorem holds for both the system (the control volume) and for its surroundings (the environment and the thermal reservoirs) separately:andwhere the index "sys" denotes quantities produced within or by the system itself, and "surr" within or by the surroundings. Therefore, summing these two forms, the theorem also holds for the thermodynamic universe as a whole:where the index "tot" denotes the total quantities of the entire universe.
Thus, the exergy formulation of the theorem is less limited, as it can be applied on different regions separately. Nevertheless, the work form is used more often.
The proof of the theorem, in both forms, uses the first law of thermodynamics, writing out the terms , , and  in the relevant regions, and comparing them.