Unit content
Entropy changes of ideal gases
Combining the Gibbs relations with the ideal-gas model gives practical formulas for entropy differences.
For an ideal gas,
$$ds=\frac{c_p(T)}{T},dT-R\frac{dp}{p},$$
or equivalently
$$ds=\frac{c_v(T)}{T},dT+R\frac{dv}{v}.$$
If specific heats are approximately constant,
$$s_2-s_1=c_p\ln\frac{T_2}{T_1}-R\ln\frac{p_2}{p_1},$$
and
$$s_2-s_1=c_v\ln\frac{T_2}{T_1}+R\ln\frac{v_2}{v_1}.$$
For an isothermal ideal-gas compression with $p_2/p_1=4$,
$$\Delta s=-R\ln4<0.$$
The gas's entropy decreases, but the second law is not violated: the surroundings must receive enough entropy through heat transfer that total entropy generation remains nonnegative.
Setting $\Delta s=0$ in these relations produces the standard isentropic ideal-gas pressure-temperature-volume relations.