The Question:
Suppose that $\mathbf u = (u(\mathbf x,t),v(\mathbf x,t))$ where $\mathbf x = (x,y)$ satisfies
$$\nabla \cdot \mathbf u = \frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}=0$$
Define the function
$$\phi(\mathbf x,t) = \phi_0(t)+\int_\mathbf 0 ^ \mathbf x \mathbf u \cdot d\mathbf x$$
(i) Show that the integral above is independent of choice of path from $\mathbf 0$ to $\mathbf x$
(ii) Show that $\mathbf u = \nabla \phi$
My Attempt:
(i) I managed to do this using Stoke's Theorem
(ii) Apparently it is supposed to be really straightforward, but after writing
\begin{align} \nabla \phi & = \nabla \bigg(\phi_0(t)+\int_\mathbf 0 ^ \mathbf x \mathbf u \cdot d\mathbf x \bigg) \\ & = (\mathbf 0)+\bigg(\frac{\partial}{\partial x}\,,\,\frac{\partial}{\partial y} \bigg) \int_\mathbf 0 ^ \mathbf x(udx+vdy) \end{align}
I kinda got stuck.
Any hints? How do you put the partial derivatives into the integral?
Note:
For those of you who know fluid dynamics, this is indeed about the velocity field $\mathbf u$ and the velocity potential $\phi$ in an incompressible flow, but otherwise it is just a calculus question.
Note that the variable $t$ does not enter the game.
The statement (i) is wrong. From ${\rm div}({\bf u})=u_x+v_y=0$ you cannot conclude that ${\rm curl}({\bf u})=v_x-u_y=0$. But the latter is a necessary condition to make the field ${\bf u}$ conservative.
If the field ${\bf u}$ is for some reason conservative anyway, and a potential $\phi$ is defined by the integral given in the question, then one indeed has $\nabla\phi={\bf u}$.