Calculate the entropy change