Cp is used when pressure of the gas is kept constant. Cv is used only when volume is kept constant. But to represent du , the change in internal energy, we use the formula n Cv dT. refer the derivation of Cp - Cv = R. There we keep volume constant and find the equation for du. As du depend only on the state we use the same formula du whether pressure is constant or volume is constant.