Two ways of finding a Potential of a Vector Field If $\vec{F}(x,y)$ is a conservative vector field and we want to find a function $V$ such that $\nabla(V)=\vec{F}$, then one way to do it is to take an arbitrary point $(x_0,y_0)$ and then define $V(x,y)$ to be the line integral of $\vec{F}$ along an arbitrary curve $C$ from $(x_0,y_0)$ to $(x,y)$.  ($V$ is well-defined because the line integral is path-independent.)
But there's another way to find a potential of a conservative vector field: you use the fact that $\frac{\partial V}{\partial x} = F_x$ to conclude that $V(x,y)$ must be of the form $\int_a^x F_x(u,y) du + G(y)$, and similarly $\frac{\partial V}{\partial y} = F_y$ implies that $V(x,y)$ must be of the form $\int_b^y F_y(x,v) du + H(x)$.  So you find functions $G(y)$ and $H(x)$ such that $\int_a^x F_x(u,y) du + G(y) = \int_b^y F_y(x,v) du + H(x)$
My question is, how do the two methods produce the same result?  Specifically, given a function $V$ constructed using the first method, how can you find a function $G(y)$ corresponding to it?  For any specific vector field $\vec{F}(x,y)$ you can just find it by inspection, but is it possible to come up with a general expression for it in terms of the line integral of $F$?  Similarly, is there a general expression for $H(x)$?
I think it's probably most convenient to let $x_0 = a$ and $y_0 = b$.
 A: We are given a vector field ${\bf F}$ in the plane ${\mathbb R}^2$ (or on an open domain $\Omega\subset{\mathbb R}^2$), and we are told that ${\bf F}$ is conservative. It follows that this field is a gradient field, i.e., that there is a scalar function $V:\>\Omega\to{\mathbb R}$ such that
$$\nabla V(x,y)={\bf F}(x,y)\qquad\forall \ (x,y)\in\Omega\ .\tag{1}$$
Furthermore, two functions $V_1$, $V_2$ satisfying $(1)$ differ by a constant, since $\nabla(V_2-V_1)\equiv{\bf 0}$.
Therefore the set of solutions of $(1)$ is determined once and for all, and any method claiming to furnish these solutions has to produce the same set of functions $V:\>\Omega\to{\mathbb R}$.
When we we are talking about "some given vector field ${\bf F}$" without making reference to specific expressions defining this field, an explicit "prescription" for obtaining an admissible $V$ is in terms of line integrals: Choose a point ${\bf z}_0=(x_0,y_0)$ as "zero of the potential", and define $V$ as
$$V({\bf z}):=\int_{{\bf z}_0}^{\bf z} {\bf F}({\bf r})\cdot d{\bf r}\ ,\tag{2}$$
where the integral can be taken along any path from ${\bf z}_0$ to ${\bf z}$, e.g., along the segment $[{\bf z}_0,{\bf z}]$, if this segment completely lies in $\Omega$.
When a concrete ${\bf F}=(P,Q)$ is given by expressions $P(x,y)$, $Q(x,y)$ then setting up a line integral $(2)$ in terms of a parameter $t$ is an admissible way to proceed, but might be cumbersome. Instead we proceed in the following way, anticipated in your question: From $(1)$ we know that
$$V_x(x,y)=P(x,y)\qquad\forall \ (x,y)\in\Omega\ .$$
It follows that for each fixed $y$ we have $V(x,y)=\int P(x,y)\ dx$ "up to a constant", whereby this constant may depend on the chosen $y$. Therefore we know that $V(x,y)$ has to be of the following form:
$$V(x,y)=P^{\uparrow}(x,y)+G(y)\ ,\tag{3}$$
where $P^{\uparrow}(x,y)$ denotes an arbitrary primitive of $x\mapsto P(x,y)$ with respect to $x$, obtained by "function term integration". The (unknown) function $G$ introduced here has no geometric or physical interpretation whatsoever; in particular it has no interpretation in terms of the line integrals $(2)$. (In fact writing $P^{\uparrow}$ has introduced an arbitrary hidden $\tilde G$, which $G$ has to compensate at the end in the right way.) At this point don't introduce a similar unknown function $H(x)$, but do argue as follows: Because of $(1)$ we necessarily have
$${\partial\over\partial y}\left(P^{\uparrow}(x,y)+G(y)\right)=V_y(x,y)=Q(x,y)\ ,$$
and this leads to the condition
$$G'(y)=Q(x,y)-{\partial\over\partial y}P^{\uparrow}(x,y)\ ,\tag{4}$$
which determines $G$ up to an additive constant. Since we were guaranteed at the beginning that the given field ${\bf F}$ is conservative the variable $x$ will not appear on the right side of $(4)$.
