# Constant volume Specific heat and internal energy relationship in nonideal gas.

Hi,
1.
$$\color{blue}dq=dU+PdV$$
so
$$C_V = \left(\frac {\partial q}{\partial T}\right)_V= \left(\frac {\partial U}{\partial T}\right)_V$$
$$dU=C_{V}dT$$
so
$$\color{red}\left(\frac {\partial U}{\partial V}\right)_T = 0$$
meaning that internal energy of NONideal gas is a sole function of T?
2.
As
$$\color{blue}dq=dU+PdV$$
so
$$\left(\frac {\partial U}{\partial V}\right)_T= \left(\frac {\partial V}{\partial T}\right)_P \left(C_P-C_V\right) - P$$
why? even for ideal gas the change in volume results in change in internal energy:
$$\color{red}\left(\frac {\partial U}{\partial V}\right)_T \not= 0??$$