Why must $\left(\frac{\partial U}{\partial V}\right)_{T}=0$ for an Ideal Gas? From the ideal gas (eqn of state) $$V=\frac{NK_BT}{P}\tag{1}$$
Where $P$ is the absolute pressure of the gas, $N$ is the number of molecules in the given volume $V$, $K_B$ is the Boltzmann constant, and $T$ is the absolute (thermodynamic) temperature.
The general equation for the internal energy $U$ of an ideal gas is given by $$\fbox{$U=\frac12 n_dNK_BT=\frac12 n_dPV$}\qquad\text{using (1)}$$ where $n_d$ is the number of degrees of freedom of the gas molecules.
With the ideal gas pressure held constant I know that 
$$\left(\frac{\partial V}{\partial T}\right)_{P}=\left(\frac{\partial \left(\frac{NK_BT}{P}\right)}{\partial T}\right)_{P}=\frac{NK_B}{P}\tag{2}$$
But, by my logic at constant temperature $$\fbox{$\color{red}{\left(\frac{\partial U}{\partial V}\right)_{T}=\left(\frac{\partial \left(\frac12 n_dPV\right)}{\partial V}\right)_{T}=\frac12 n_dP\ne 0}$}$$ 
The reason I'm asking this question is because it forms part of the proof that the heat capacity at constant pressure $C_P$ is related to the heat capacity at constant volume $C_V$: $$C_P=\left(\left(\frac{\partial U}{\partial V}\right)_{T}+P\right)\left(\frac{\partial V}{\partial T}\right)_{P}+C_V$$
$$\implies \bbox[yellow]{C_P = NK_B+C_V}$$
Where the yellow highlighted part only holds iff $$\left(\frac{\partial U}{\partial V}\right)_{T}=0$$ and $(2)$ is correct.

Could someone please explain to me why $$\left(\frac{\partial U}{\partial V}\right)_{T}=0$$ and not $\frac12 n_dP$?

Note: 
I can upload an extract of the book derivation of the highlighted formula if needed/requested.
 A: When calculating $\left(\frac{\partial U} {\partial V}\right)_T$ you have to consider $U$ as a function of $V$ and $T$. Therefore $P$ is not an independent variable. If you write
$$U=\frac{n_d}{2}PV$$
then you must remember $P$ is also a function of $V$ and $T$. Explicitly,
\begin{align}U(V,T) &=\frac{n_d}{2}P(V,T)V\\ &=\frac{n_d}{2}\frac{Nk_BT}{V}V\\ &=\frac{n_d}{2}Nk_BT\end{align}
and hence
$$\left(\frac{\partial U}{\partial V}\right)_T=0\;.$$
Alternatively,
\begin{align}U(V,T)&=\frac{n_d}{2}P(V,T)V\\ \left(\frac{\partial U}{\partial V}\right)_T &=\frac{n_d}{2}\frac{\partial}{\partial V}(PV)\\ &=\frac{n_d}{2}\left[P+V\left(\frac{\partial P}{\partial V}\right)_T\right]\\ &=\frac{n_d}{2}\left[P+V\left(\frac{\partial}{\partial V}\frac{Nk_BT}{V}\right)_T\right] \\ &=\frac{n_d}{2}\left[P-V\frac{Nk_BT}{V^2}\right]\\ &=\frac{n_d}{2}\left[P-\frac{Nk_BT}{V}\right]\\ &=0\;.\end{align}
A: Your red equation is wrong. Recall that at fixed $T$, $P$ is a function of $V$.  So you instead have
$$ \left(\frac{\partial U}{\partial V}\right)_T=\frac{1}{2}n_dP + \frac{1}{2}n_dV\frac{\partial P}{\partial V} $$
Evaluate $\partial P/\partial V$ using eq. (1) and you're done.
