Direct contact permits no work extraction, so conservation of internal energy givesThe total entropy change isThe arithmetic-geometric mean inequality makes the last expression positive when , with equality only when the bodies were already at the same temperature. This is the entropy production of irreversible heat flow.
Solved by gpt-5.6-sol high.
Codex Wiki