Clarification on the first law of thermodynamics As I understand it, the first law of thermodynamics
$$
     \text{d}Q = \text{d}U + p\text{d}V - \mu \text{d}N
$$
is equivalent to saying: $Q$ is a differentiable real valued function of $U,V$ and $N$, so that we can write $\text{d}Q = \frac{\partial Q}{\partial U}\text{d}U + \frac{\partial Q}{\partial V}\text{d}V + \frac{\partial Q}{\partial N}\text{d}N$, and $\frac{\partial Q}{\partial U}=1$. Also, we define $p=\frac{\partial Q}{\partial V}$ and $-\mu=\frac{\partial Q}{\partial N}$.
Is that it?
 A: So yes, an expression like $$\delta f = g(x,y)~dx + h(x,y)~dy,$$is somewhat hard to parse at first. It means that there is some quantity which you care about defined by the integral, $$f = \int_0^1 ds~g\big(x(s), y(s)\big)~\frac{dx}{ds}+\int_0^1 ds~h\big(x(s), y(s)\big)~\frac{dy}{ds},$$where the system takes a path $s \mapsto [x(s), y(s)]$ from $s=0$ at the start to $s=1$ at the end. I hope you can appreciate why we would like to write it the above way! The actual expression is very complicated, the compact way above is much simpler.
Sometimes, the expressions one gets are integrable and have a "path independence" to them. For example if I tell you that $df = y~dx + x~dy$ you might be able to see that this is an exact differential for $f(x, y) = x~y + C.$ Usually in physics we just look for commuting partial derivatives, so ${\partial g \over \partial y} = {\partial h \over \partial x},$ to give this integrability property. So an example which does not work is that if one wrote $y~df = y^2~dx + x~y~dy$, those partial derivatives are no longer equal; one is $\frac12 y$ and the other is $y$. So now $\delta q = y~df$ is not an exact differential implying a state function, even though $df$ is. Now let's run that argument backwards.
Let's define $r = \frac{\partial g}{\partial y} - \frac{\partial h}{\partial x},$ then multiplying through by some factor $p$ causes $r \mapsto p~r(x, y) + g(x, y)\frac{\partial p}{\partial y} - h(x, y)\frac{\partial p}{\partial x}.$ In pretty general circumstances one can imagine that we find some $p$ which sets this to 0 (it's just a linear first-order PDE), and then we know that even if $\delta f$ was not an exact differential, $p~\delta f$ is.
At least for reversible processes we define the entropy change $dS = dQ/T,$ this is precisely what we are attempting to do with that first law; we are multiplying through by $1/T$ to find an exact state function $S$ for the system, which we call the entropy. (For irreversible processes the work one gets back out is strictly lower than the maximum one could get, and so there is also a "lost work" term in the expression.) It may not be completely obvious that $T$ should be the temperature, but one can derive that if the $S$ for a closed system is restricted to increase, and that closed system is made up of two coupled systems sharing energy, then the one with higher $T$ spontaneously sends energy to the one with lower $T$ in order to increase $S$ -- this gives a physical intuition based on the idea that this state function should always be increasing.
A: No, because $\delta Q$ is an inexact differential, meaning it's path dependent. Also, if it were true that, e.g., $\partial Q/\partial U =1$, than a change in internal energy $U$ would always correspond to exchanged heat $Q$, what's of course not true (i.e., there exist adiabatic processes).
