My professor offered this derivation of the adiabatic relation $TV^{\gamma-1}=\text{const.}$ :
Since $\delta Q=0$:
$$dU=\delta W,$$
using $C_V=\left(\frac{\partial U}{\partial T}\right)_V\implies dU=C_V\, dT:$
$$C_V\,dT=-PdV,\tag{1}$$
since for an ideal gas $PV=nRT:$
$$C_V\,dT=-\frac{nRT}{V}dV\implies C_V\frac{dT}{T}=-nR\frac{dV}{V},\tag{2}$$
integrating:
$$C_V\ln{T}=-nR\ln{V}+C_1,\quad C_1\in\mathbb{R}.\tag{3}$$
Defining $\gamma=\frac{C_P}{C_V}$ and using $C_P-C_V=nR$:
$$\ln{T}+(\gamma-1)\ln{V}=C_2\implies TV^{\gamma-1}=\text{const.}\quad\blacksquare$$
My question is why can we use the heat capacity at constant volume here? If we assume constant volume, doesn't equation (1) lead to a contradiction in that $dV$ should be zero? Conceptually, I would think that the $C_V$ relation should only be used when, in this case, the work done on the gas is converted directly into internal energy at constant volume.