\(\mathrm{T}_{\mathrm{i}}\) to \(\mathrm{T}_{\mathrm{f}}\) and pressure changes from \(\mathrm{p}_{\mathrm{i}}\) to \(\mathrm{P}_{\mathrm{f}}\)
\(\Delta S=n C_{p} \ln \frac{T_{f}}{T_{i}}+n R \ln \frac{p_{i}}{p_{f}}\)
For an isothermal process, \(T_{i}=T_{f}\) so, \(\ln 1=0\)
\(\therefore \quad \Delta S=n R \ln \frac{p_{i}}{p_{f}}\)