Which one is correct $\Delta U = nC_v \Delta T$ or $q = nC_v \Delta T$?

The precise definition of Cv involves the partial derivative of U with respect to temperature at constant volume: $$C_v=\frac{1}{n}\left(\frac{\partial U}{\partial T}\right)_V$$For an ideal gas, U and $C_v$ are functions only of temperature, so it doesn't matter if the volume changes. But, for other equations of state, this is not necessarily the case.


BOTH. In an isochoric process, the gas does not do any work - since $W=P\Delta V$ and the volume, being constant renders the work done zero.

So,the first law of thermodynamics becomes, $$Q=\Delta U+W$$ Since $W=0$, $$Q=\Delta U$$ So, both the formulae are correct.

EDIT The relation $Cv=\frac{\Delta U}{n\Delta T}$ is always applicable. The relation between internal energy and temperature, as you have read from the answer, can be derived from kinetic theory (using the equipartition theorem). $$U=\frac f2 nrt$$ Differentiating this, you will get the expression you seek. So, the term $C_v$ is in the equation only because it fits the necessary condition (it is a lot more easier to measure than the degrees of freedom).

So, in short, the $C_v$ has to be measured under constant volume, because, under constant volume, $C_v=\frac f2 R$$. But, once you have found that out, you can expect it to valid everywhere.

For an even more intuitive example, I'll give you an example.

Consider, a a system (gas) at a temperature $T_1$. Now, you give it some energy (say, under constant volume)and take its temperature to $T_2$. Let the change in internal energy be $\Delta U$. Let this be case one.

In the next case, you supply more energy, but still, bring the temperature down by the same amount (i.e. to $T_2$). Now, since the internal energy must depict the temperature (to some extent) of the gas, the change in internal energy must remain the same. So, the $\Delta U$ you defined in the first case should be valid here too, hence generalising the expression