## Problem on trying to find the potential of a nonconservative vector field

The vector field $\mathbf{F}(x,y) = -y \mathbf{i} + x \mathbf{j}$ is not conservative. Try to find the potential function for it by integrating each component. What goes wrong?
• ## Solution

Recall that
The components of this vector equation are \begin{align} -y &= \partial_x \phi(x,y)\\ x &= \partial_y \phi(x,y) \end{align}
Integrating the first equation gives $\phi(x,y) = -x y + g(y)$, for any $g$. Integrating the second equation gives $\phi(x,y) = x y + h(x)$, for any $h$.
Equating these two expressions for $\phi$ gives \begin{align}xy + h(x) &= -xy + g(y),\\ 2xy &= g(y) - h(x). \end{align}
The product $xy$ can not be expressed as a function of $y$ minus a function of $x$.
What goes wrong is that there is no way to combine the equations given by the component-wise integration.