jambaugh said:
Whether it is "much better" may be a matter of the specifics of the problem. I doubt it is substantially better, the method is intrinsically the same (you'll have to integrate twice).
I'll agree it may be better and will be "as good as".
As to "matching up" leading to wrong answers, I do not see how.
Once you integrate each part you have an equation:
f(x,y)+C(y) = g(x,y)+D(x)
Given a solution, a C and D function for which you have equality satisfied, you will have a function whose gradient IS the original field. A solution is a solution.
I don't disagree with anything you have said here. The problem I have encountered is when students get a bit too informal with it. All too many times I have seen students, when faced with finding a potential function ##\phi## for a vector field like $$
\vec V = \langle y^2+2e^{2x},2xy -\sin y\rangle$$ they, in stead of correctly "matching up" the two results, do the following:
##\phi_x = y^2+2e^{2x}## so ##\phi = xy^2 +e^{2x}##
##\phi_y = 2xy-\sin y## so ##\phi = xy^2+\cos y##.
They now look at those two results and build an answer by taking "anything new" but not repeating any common terms, so they don't write the ##xy^2## twice and give a final answer
##\phi(x,y) = xy^2 +e^{2x}+\cos y##
which is correct. And building the answer this way frequently, I would even say almost always, gives them the correct answer in spite of the fact that they have ignored the "constants" of integration. I used to give them an example where, when they did that, they got the wrong answer because the common part of the two answers didn't look the same since they differed from each other by a constant, which wasn't obvious to them. So they put it in twice when building their final version of ##\phi##.
I would go so far as to state that, if for no other reason, the method I have suggested (which is standard in any calculus book I have seen) is never more complicated than yours and frequently easier.