derivation of partial differential equations for changes in U
One definition of a state function such as internal energy $U$ is that its infinitesimal change is equal to an exact differential. Thus in general

$$\mathrm{d}U=\sum_{i=1}^n\left(\frac{\partial U}{\partial x_i}\right)_{x_j} \mathrm{d}x_i.$$

There are various variables with regard to which one can apply the partial derivative. Entropy, volume, temperature to name a few. Usually we assume that our thermodynamic state functions are two-dimensional but this is only if the number of moles is constant.

$$\mathrm{d}U= \frac{\partial U}{\partial T}\mathrm{d}T + \frac{\partial U}{\partial V}\mathrm{d}V +\sum_{i=1}^k\frac{\partial U}{\partial n_i}\mathrm{d}n_i \overset{\mathrm{d}n_j\ =\ 0}{\implies} \mathrm{d}U = \left(\frac{\partial U}{\partial T}\right)_{V,n_j}\mathrm{d}T + \left(\frac{\partial U}{\partial V}\right)_{T,n_j}\mathrm{d}V.$$

A good way to think of this assumption is that other functions are also simply functions of $T$ and $V$, e.g., $S = S(T,V)$. From the equation

$$\mathrm{d}U = \left(\frac{\partial U}{\partial T}\right)_{V,n_j}\mathrm{d}T + \left(\frac{\partial U}{\partial V}\right)_{T,n_j}\mathrm{d}V$$

you can reach the other two equations by imposing $\mathrm{d}T = 0$ and $\mathrm{d}V = 0$, respectively.