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. Expressed as an integral:
ΔS = Sf - Si =
dQ
T

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

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

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