# How was $C_p-C_v=\left(\frac{\partial P}{\partial T}\right)_{Vn}\left(\frac{\partial \:V}{\partial \:T}\right)_{Pn}$ dervied

I found the following relationship whilest on wiki reading up about heat capacity and cannot figure where the relationship has come from. Would it be possible for someone to maybe outline where it has been derived from?

$$C_p-C_v=\left(\frac{\partial P}{\partial T}\right)_{Vn}\left(\frac{\partial \:V}{\partial \:T}\right)_{Pn}$$

We have $$dH=dU+d(PV)$$ So, by definition, $$C_p=\left(\frac{\partial H}{\partial T}\right)_P=\left(\frac{\partial U}{\partial T}\right)_P+P\left(\frac{\partial V}{\partial T}\right)_P\tag{1}$$ We also have that $$dU=C_vdT-\left[P-T\left(\frac{\partial P}{\partial T}\right)_V\right]dV$$Taking the partial derivative of this equation with respect to T at constant P yields: $$\left(\frac{\partial U}{\partial T}\right)_P=C_v-\left[P-T\left(\frac{\partial P}{\partial T}\right)_V\right]\left(\frac{\partial V}{\partial T}\right)_P\tag{2}$$ If we substitute Eqn. 2 into Eqn. 1, we obtain:$$C_p-C_v=T\left(\frac{\partial P}{\partial T}\right)_V\left(\frac{\partial V}{\partial T}\right)_P$$