Derivation of temperature-volume relationship for a reversible adiabatic expansion of an ideal gas We start with $\delta q = 0$ and $dU = C_{V}(T)dT = \delta w$. Why can we take the heat capacity at constant volume, when this process is an expansion so volume increases?
 A: This is valid for ideal gas whose molar number is constant $n$. Why?
When a fluid changes volume, the equation
$$
dU =dQ - pd V
$$
is obeyed. Formally dividing by $dT$ we obtain
$$
\frac{dU}{d T} = \frac{d Q}{dT} - p\frac{d V}{d T}.
$$
If we now consider only processes where $V$ remains constant, the relation
$$
\frac{dU}{d T}\bigg|_{V=const.} = \frac{d Q}{d T}\bigg|_{V=const.}
$$
is obeyed. 
Because of the right-hand side, we call this quantity heat capacity at constant volume and denote it $C_V(T,V)$. Generally it is a function of both $T$ and $V$ and is sufficient to express the change in the internal energy in the above way only when $V=const.$
However, for ideal gas internal energy is a function of $T$ only - let me denote it $U^{(id)}(T)$. This means that the condition on the left-hand side is superfluous - its presence does not matter. The value of the derivative can be  calculated without any condition on the process:
$$
\frac{dU(T,V)}{d T}\bigg|_{V=const.} = \frac{dU^{(id)}(T)}{d T}.
$$
Thus the heat capacity at constant volume can be calculated as ratio of delta $U$ to delta $T$, process being immaterial. Because of the right-hand side, we know the result is a function of $T$ only - let me denote this function $C_V^{(id)}(T)$.
Now any change in the internal energy of ideal gas, irrespective of whether any other quantity is constant or not, can be written as
$$
dU^{(id)}(T) = \frac{dU^{(id)}}{dT}(T)d T.
$$
From the previous equation it follows that for any process, 
$$
dU^{(id)}(T) = C_V^{(id)}(T)dT.
$$
