In textbook thermodynamics, does heat $Q$ have a derivative of volume $V$? I'm just trying to get $U(V_2, T_2)  - U(V_1, T_1)$ for an non-ideal gas, given the heat capacity at constant volume $c_V(V,T)$ and the equation of state $P(V,T)$. I know I can start from the equation:
$$ dU = dQ - PdV $$
From here, I want to get this in the form that I could integrate from $V_1$ to $V_2$ and $T_1$ to $T_2$, but taking the total derivative with respect to $V$ and $T$ of this equation is very confusing to me.
I know I want to do something like:
$$ dU = \left ( \frac{dU}{dT} \right )_V dT + \left ( \frac{dU}{dV} \right )_T dV $$ 
I know that $ \left ( \frac{dU}{dT} \right )_V = C_V(V, T) $, but for  $\left ( \frac{dU}{dV} \right )_T$, I'm not sure whether this would just be $-p$ or $\left ( \frac{dQ}{dV} \right )_T - p$. In the latter case, I don't know what $dQ/dV \big |_T $ is... it's not mentioned in the equation of state or the heat capacity.
 A: The correct equation to start with in your analysis is $$dU=TdS-PdV\tag{1}$$  This equation describes  the mutual variations in U, S, and V between two closely neighboring (i.e., differentially separated) thermodynamic equilibrium states of a substance.  It doesn't matter how tortuous or extensive the process path was that took the substance from its initial thermodynamic equilibrium state to its final thermodynamic equilibrium state as long as, in the end, the two states are very close together.  (So imagine two paths through your neighborhood, one which is very tortuous and takes you from your house through many streets before coming back to your immediate neighbor's house, and the other which goes directly from your house to his house.)  Eqn. 1 also applies even if the intermediate states between the initial and final closely neighboring equilibrium states were the ends of a very tortuous irreversible path.  Recall that, in determining the entropy change for an irreversible path, the two key steps are


*

*Using the 1st law of thermodynamics, establish the final thermodynamic equilibrium state

*Totally forget about the actual irreversible process path, and devise an alternate reversible process path between the same two end states.  Determine the integral of dq/T for that alternate reversible process path.


So, in the present case, for Eqn. 1, even though the process path between the two differentially separated end states may have been tortuous and irreversible, the equation was derived for the same two end states using an alternate reversible path.  So this equation applies to all differentially separated thermodynamic equilibrium end states of a substance.
As @GezaLaTex has pointed out, when expressed in terms of dT, dV, and the definition of Cv, Eqn. 1 for the internal energy change becomes:
$$dU=C_vdT-\left[P-T\left(\frac{\partial P}{\partial T}\right)_V\right]dV\tag{2}$$
In most cases, Cv is going to be a function of specific volume, and we are only going to know Cv in the ideal gas limit of large specific volumes V. So, to employ Eqn. 2 to determine $U(T_2,V_2)-U(T_1,V_1)$, we must use Hess' law and employ a path that passes through this ideal gas region.  This can be done by writing $$U(T_1,V_1)\rightarrow U(T_1,\infty)\rightarrow U(T_2,\infty)\rightarrow U(T_2,V_2)\tag{3}$$
So, following this prescription, we have:
$$U(T_2,V_2)-U(T_1,V_1)=-\int_{V_1}^{\infty}{\Pi (T_1,V)dV}+\int_{T_1}^{T_2}{C_v(T,\infty)dT}+\int_{V_2}^{\infty}{\Pi (T_2,V)dV}$$
where $$\Pi (T,V)=P-T\left(\frac{\partial P}{\partial T}\right)_V$$
A: You don't have
$$\text{d}U=\delta Q-p\cdot\text{d}V$$
but
$$\text{d}U=T\cdot\text{d}S-p\cdot\text{d}V$$
The first principles assumes
$$\text{d}U=\delta Q+\delta W$$
with
$$W=\int_1^2 \delta W=-\int_{V_1}^{V_2} p_\text{ext}\cdot\text{d}V$$
If the transformation is mechanically reversible, on have $$p_\text{ext}\approx p$$
On the other hand, you have with the Maxwell's Relations
$$\text{d}U=C_V \cdot \text{d}T+\left[T\cdot\left(\frac{\partial p}{\partial T}\right)_V-p\right]\cdot\text{d}V$$
so
$$Q=\int_{V_1}^{V_2} p_\text{ext}\cdot\text{d}V+\int_{T_1}^{T_2} C_V\cdot\text{d}T+\int_{V_1}^{V_2}\left[T\cdot\left(\frac{\partial p}{\partial T}\right)_V-p\right]\cdot\text{d}V$$
