In physics courses, one is taught to think of $dU$ as "a small change in the Potential Energy". I wonder what a precise mathematical definition of these objects might be. For example, in the first law of thermodynamics $$ dQ=dU+dW $$ what is this $d$? Is it the exterior derivative? I don't know how to make sense of it.
Also, setting $dQ=TdS=dU+dW=dU+pdV-\mu dN$, how can one justify that $\frac{\partial S}{\partial U}|_{V,N}=\frac{1}{T}$ ?
For a different example, we can look at
$$dE=TdS-pdV$$
This is a compact notation saying that $E$ depends on $S$ and $V$, $\frac{\partial E}{\partial S}=T,\frac{\partial E}{\partial V}=-p$. One does not need to really make sense of the differential symbols themselves, instead you can think of this as just a shorthand. Indeed I would suggest this approach, because without this you will tend to make mistakes such as expecting $\frac{\frac{\partial E}{\partial S}}{\frac{\partial E}{\partial V}}=\frac{\partial V}{\partial S}$ when in fact there is a minus sign involved.
The dQ example is similar except that Q is not a state function, so it does not make sense to say "Q depends on U and W". Still, given a path between two configurations you can determine the heat change by integrating dQ along that path.
Part of the reason that this seemingly peculiar notation is used in thermodynamics is that really every state function can be thought of as depending on some other set of state functions. For example, one can describe the equilibrium behavior of some gas through $E(S,V)$ or $S(E,V)$; both are equally valid, it just depends on your preferences. This differential notation puts the two presentations on more similar footing than the usual mathematical notation does.