Entropy is a function of state, and therefore the entropy change can be computed directly from the knowledge of the final and initial equilibrium states. For an ideal gas, the change in entropy is the same as for isothermal expansion where all heat is converted to work: Δ Δ S = ∫ ∫ i f d S = ∫ ∫ V i V f P d V T = ∫ ∫ V i V f n R d V V = n R ln ⁡ ⁡ V f V i = N k B ln ⁡ ⁡ V f V i .