Change in Entropy

Entropy changes whenever there is a transfer of heat. The change in entropy is the heat added divided by the temperature at which the transfer took place.

If the heat transfer takes place at a single temperature, the change in entropy is simply:
isothermal process:   DS =
Q
T

If the heat transfer takes place over a range of temperatures then, as long as DT is small compared to the absolute temperature T, the change in entropy is approximately:
DS =
Q
Tavg

For an ideal gas, it can be shown that the change in entropy is given by:
DS = nR ln (
Vf
Vi
) + n CV ln (
Tf
Ti
)