Since entropy is a state function, the entropy change of any process in which temperature and volume both vary is the same as for a path divided into two steps – heating at constant volume and expansion at constant temperature. For an ideal gas, the total entropy change is: Δ Δ S = n C V ln ⁡ ⁡ T T 0 + n R ln ⁡ ⁡ V V 0 Similarly if the temperature and pressure of an ideal gas both vary: Δ Δ S = n C P ln ⁡ ⁡ T T 0 − − n R ln ⁡ ⁡ P P 0