Finding a vector potential for a solenoidal vector field 
I have to find a vector potential for $F = -y \hat{i} + x \hat{j}$

This is what I have done:
We know that, if $\nabla \cdot F = 0$, we can construct the following:
$$F= \nabla\times G$$ 
Where $G$ is the vector potential we want to find out.
We know what F is, so it is just about doing the following:
$$\frac{\partial G_3}{\partial y} - \frac{\partial G_2}{\partial z} = -y$$
$$\frac{\partial G_1}{\partial z} - \frac{\partial G_3}{\partial x} = x$$
Noting that the partial derivatives with respect to $z$ are zero in this case, we get:
$$G = \frac{-x^2-y^2}{2}+C$$
Where $C$ is just the gradient of any scalar.
I am given a whole list of possible vector potentials:

Now I could use the most brute method: Trial and error with each possible vector potential given, using the equation:
$$G_n = \frac{-x^2-y^2}{2}+C$$
Solving for $C$ and seeing whether it holds.
This is pretty tedious; is there any brightest method?
Thanks.
EDIT
$$\frac{\partial G_2}{\partial z} = y$$
$$\frac{\partial G_1}{\partial z} = x$$
$$\frac{\partial G_2}{\partial x} - \frac{\partial G_1}{\partial y} = 0$$
I get:
$$G = <xz,yz,0>$$
Which indeed satisfies:
$$F= \nabla\times G$$ 
But this option is not in the list...
Now let's set $G_2 = 0$:
$$\frac{\partial G_3}{\partial y} = -y$$
$$\frac{\partial G_1}{\partial z} - \frac{\partial G_3}{\partial x} = x$$
$$\frac{\partial G_1}{\partial y} = 0$$
I get:
$$G = <0,0,\frac{-x^2 - y^2}{2}>$$
Which indeed satisfies:
$$F= \nabla\times G$$ 
 A: As has been shown to OP already, this link gives a certain method to determine $G$.
If $\mathbf{G}=(G_1,G_2,G_3)$ can be decomposed into another potential $\mathbf{H}=(H_1,H_2,H_3)$ and the gradient of a scalar function $f(x,y,z)$, i.e
$$\mathbf{G} = \mathbf{H} + \nabla f$$
This implies that
$$ \nabla \times \mathbf{G} = \nabla \times (\mathbf{H} + \nabla f) = \nabla \times \mathbf{H} + \nabla \times(\nabla f) = \nabla \times \mathbf{H} + \mathbf{0} = \nabla \times \mathbf{H}  $$
Hence $\mathbf{G}$ is not unique and one can make specific choices to determine $\mathbf{G}$.
If we make the choice such that $$ \frac{\partial f}{\partial z} = -H_3$$
Then $\mathbf{G}=(H_1,H_2,H_3) +(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y},-H_3) = (H_1+\frac{\partial f}{\partial x},H_2+\frac{\partial f}{\partial y},0) = (G_1,G_2,0)$.
So we can choose $\mathbf{G}$ such that it can be either
\begin{align}
&(0,G_2,G_3) \text{ or}\\
&(G_1,0,G_3) \text{ or}\\
&(G_1,G_2,0)
\end{align}
So let us see what these choices can produce. We have the equations of $\nabla \times \mathbf{G} = \mathbf{F}$,
\begin{align}
&\frac{\partial G_3}{\partial y} - \frac{\partial G_2}{\partial z} = -y \\
&\frac{\partial G_1}{\partial z} - \frac{\partial G_3}{\partial x} = x \\
&\frac{\partial G_2}{\partial x} - \frac{\partial G_1}{\partial y} = 0 \\
\end{align}
If $G_1 = 0$, then we have
\begin{align}
&\frac{\partial G_3}{\partial y} - \frac{\partial G_2}{\partial z} = -y \\
-&\frac{\partial G_3}{\partial x} = x \Rightarrow G_3 = -\frac{x^2}{2}+C_3(y,z)\\
&\frac{\partial G_2}{\partial x} = 0 \Rightarrow G_2 = C_2(y,z) \\
\end{align}
substituting the last two equations into the first, we get
$$\frac{\partial G_3}{\partial y} - \frac{\partial G_2}{\partial z} =  [C_3(y,z)]_y - [C_2(y,z)]_z = -y$$
Here, for simplicity, we can choose $C_3(y,z)=0$, because if $C_2(y,z)=0$ then two components of $\mathbf{G}$ are $0$, which never happens in the given possiblities. So,
$$-[C_2(y,z)]_z = -y \Rightarrow C_2(y,z)=yz$$
Then $\boxed{\mathbf{G} = (0,-yz,-\frac{x^2}{2})}$ which can be verified to satisfy $\nabla \times \mathbf{G} = \mathbf{F}$
If $G_2 = 0$, then we have
\begin{align}
&\frac{\partial G_3}{\partial y} = -y \Rightarrow G_3 = -\frac{y^2}{2} + C_3(x,z)\\
&\frac{\partial G_1}{\partial z} - \frac{\partial G_3}{\partial x} = x \\
-&\frac{\partial G_1}{\partial y} = 0 \Rightarrow G_1 = C_1(x,z) \\
\end{align}
then we get
$$\frac{\partial G_1}{\partial z} - \frac{\partial G_3}{\partial x} =  [C_1(x,z)]_z - [C_3(x,z)]_x = x$$
Here, for simplicity, we can choose $C_3(x,z)=0$, for the same reason being we dont want two components of $\mathbf{G}$ to be $0$
$$[C_1(x,z)]_z = x \Rightarrow C_1(x,z)=xz$$
Then $\boxed{\mathbf{G} = (xz,0,-\frac{y^2}{2})}$ which can be verified to satisfy $\nabla \times \mathbf{G} = \mathbf{F}$
If $G_3 = 0$, then we have
\begin{align}
-& \frac{\partial G_2}{\partial z} = -y \Rightarrow G_2 = yz + C_2(x,y)\\
&\frac{\partial G_1}{\partial z} = x \Rightarrow G_1 = xz +C_1(x,y) \\
&\frac{\partial G_2}{\partial x} - \frac{\partial G_1}{\partial y} = 0 \\
\end{align}
then we get
$$\frac{\partial G_2}{\partial x} - \frac{\partial G_1}{\partial y} =  [C_2(x,y)]_x - [C_1(x,y)]_y = 0 \Rightarrow [C_2(x,y)]_x = [C_1(x,y)]_y $$
Here, for simplicity, we can choose $C_2(x,y)=C_1(x,y)=0$, and so
$\boxed{\mathbf{G} = (xz,yz,0)}$ which can be verified to satisfy $\nabla \times \mathbf{G} = \mathbf{F}$
Of the three boxed solutions, only $\mathbf{G} = (xz,0,-\frac{y^2}{2})$ is on our list, and hence it is our answer.
However, given that we have a list of options, one can arrive to this answer earlier by realizing that certain solutions of the form $(xz, f(y),0)$ will never satisfy the curl equation, so the answer will be in the form$(G_1,0,G_3)$
A: You can certainly try to compute a potential for $G$ in order to solve your original problem. One method is described in another answer here. An alternative method, which for this problem would involve finding a primitive of 2-form related to $F$, is described here. However, I don’t think that computing a vector potential is the best way to proceed here. Depending on the method that you use, you’re entirely likely to come up with one that doesn’t resemble any of the possible solutions presented in the problem. After all, just as there’s an arbitrary constant of integration in an ordinary indefinite integral, you can add any irrotational vector field to a vector potential of $F$ and get another one. Instead, you can instead use a fairly simply process of elimination to quickly reject possible solutions and zero in on the correct answer.  
Observe first that the possible solutions offered in this problem can be divided into those that have an $xz\mathbf i$ term and those that have an $xz\mathbf j$ term. Taking the latter first, we have $\nabla\times(xz\mathbf j)=-x\mathbf i+z\mathbf k$. To end up with $-y\mathbf i$, the remaining term has to somehow generate $x\mathbf i$, but since the second term in all of the potential answers depends only on $y$, none of them can do this. So, you can eliminate all of the potential answers that have $xz\mathbf j$.  
Turning now to the remaining options, $\nabla\times(xz\mathbf i)=x\mathbf j$. As noted previously, the other term of all of the potential answers depends only on $y$, so only its partial derivative with respect to $y$ will survive in the curl. However, when computing the curl, you never take the partial derivative of the $\mathbf j$-term with respect to $y$, so you can eliminate all of those options. Now, you just need to look through the surviving ones for one in which the $y$-derivative of the $\mathbf k$-term is equal to $-y$. That narrows it down to option G, i.e., $xz\mathbf i-\frac12y^2\mathbf k$.  
