following the question: Why dW=pdV is an inexact differential?
Usually the pressure p is given by the equation: $$p=-\left.\frac{\partial U}{\partial V}\right|_{S},$$ where $U=U(S,V)$ is internal energy of the system (let us not complicate things with number of particles) and S is its enthropy.
For the term $-pdV$ to be exact, the extrerior derivative must be zero. That leads to the condition: $$\frac{\partial^2 U}{\partial V\partial S}=0,$$ that is, the most general form of $U$ for which $-pdV$ is exact is: $$U=f(S)+g(V),$$ where f and g are some functions.
In such system, the work would be function of state and would not depend on history. Obviously such system is pretty wierd and i guess unrealistic, but my question is: is there some fundamental reason in thermodynamics alone that forbids such systems to exist? I.e. can i see that work must depend on the history for any system from thermodynamics alone?
Thanks:)