So we have something called an inexact differential which is when a function is path dependent meaning I can't just subtract the initial and final states to get an answer. Take for example work which is $$ W=\int F\cdot dx$$ obviously it is path dependent as if I go from $x=1$ to $2$ directly versus in a circle a different amount of work is done. So assuming $F$ is constant

$$ W=\int F\cdot dx \neq \int Fdx$$

We need $cos(theta)$ as a function of $x$.

But what about something even more simple with no vector calc dot product

$$ d(PV)=VdP+PdV$$
$$dU=-PdV+TdS+\mu dN$$
The variables $V$, $S$ and $N$ are not independent of each other and we can't simply integrate both sides. But $U$ (the system internal energy) is an exact differential and is not path dependent on S,V or N. This is even more clear with dP.

$$dW=PdV= F\cdot dx$$
Where dW is an inexact differential

How do you integrate the right hand side? For example taking the partial
$$\frac{\partial(PV)}{\partial V}=P$$
Or simply ignore dV/dP terms of full derivative

$$\int\frac{{\partial(PV)}}{\partial V} =PV +f(V)$$
$$\int\frac{{\partial(PV)}}{\partial P} =PV +f(P)$$

So we can see that it is simply probably PV but how can we do this without partials?