I have a Field $F(x,y):= \left( \begin{array}{c} ay\\ 0\\ \end{array} \right)$ and I have to find out whether this field is potential. Well despite the terminology( wich is not completely clear to me) i thought that the answer is affermative iff there exist a $U$ such that $F=-\nabla U$. An easy way would be to check if
$\dfrac{\partial F_x}{\partial y} = \dfrac{\partial F_y}{\partial x}$ holds. ( as suggested on https://physics.stackexchange.com/)
But here is my approach ( and here the question is purely mathematical) :
(1) $ay=\dfrac{\partial U}{\partial x} \Leftrightarrow \int \partial U= \int ay \partial x \Leftrightarrow U=axy + C(y)$ , where $C$ is a function of $y$ only.
(2) $0=\dfrac{\partial U}{\partial y}=ax+\dfrac{\partial C(y)}{\partial y}$ (subst. (1) in (2)) $\Leftrightarrow \partial C(y)=-ax \partial y$ but here we can clearly see that $C(y)$ depends on $x$ , wich is not possible , so there can be no potential $U$.
Is this approach right? Is the mathematics behind it right? (that's one of the first such problems that i'm solving please be patient)