Setup: Isolated system at constant T (in contact with heat bath) and constant V. System starts and ends at same V,T. Only interaction with surroundings is heat exchange.

Energy conservation:

W+ΔEsysQ=0W=QΔEsys

Entropy change of bath: ΔSbath=Q/T

By the 2nd law (ΔSexttotal0):

ΔSsysQT

equality iff reversible.

Free energy change:

ΔFsys=ΔEsysTΔSsysΔEsysTQT=ΔEsysQ=W

Result:

WΔF

equality iff reversible.

Corollary (W=0): ΔF0 — at constant T,V with no work, free energy never increases.