I need to find the potential function of a vector field. I was given F = (y+z)i + (x+z)j + (x+y)k. I found said field to be conservative, and I integrated the x partial derivative and got f(x,y,z) = xy + xz + g(y,z). The thing is that I am trying to find g(y,z), and I ended up with something that was expressed in terms of x, y and z (I got x+z-xy-xz). I don't know what to do with this information not that I arrived at something expressed in all three variables. 
 A: You have $\frac{\partial f}{\partial x}= y+ z$ so that $f(x,y,z)= xy+ xz+ g(y,z)$.  (Since the differentiation with respect to x treat y and z as constants, the "constant of integration" might in fact be a function of y and z.  That is the "g(y, z)".)
Differentiating that with respect to y, $\frac{\partial f}{\partial y}= x+ g_y(y, z)= x+ z$ so that $g_y= z$ and $g(y, z)= yz+ h(z)$.
So f(x,y,z)= xy+ xz+ yz+ h(z).  Differentiating that with respect to z, $\frac{\partial f}{\partial z}= x+ y+ h'(z)= x+ y$ so that  h'(z)= 0. h is a constant, C so that we get f(x, y, z)= xy+ xz+ yz+ C.   
A: So far, we have $f(x,y,z) = xy + xz + g(y,z)$. Taking $\frac{\partial f}{\partial x}$ gives us the $x$-component of $\textbf{F}$. To get the similar $y$ and $z$-components, we suspect that $g(y,z)$ should be similar to the other terms in $f(x,y,z)$ in some sense. The natural guess is $g(y,z) = yz$, since the other terms in $f(x,y,z)$ are each multiplications of two different independent variables. It can then be verified that the guess for $g$ produces the correct vector field, by computing $\nabla f$.
We now know that we have determined the potential function up to a constant, since if two scalar fields have the same gradient, then they differ by a constant.
A note of caution: sometimes the convention for what is meant by a potential function for a vector field $\mathbf{F}$, is a scalar field $f$ such that $\mathbf{F} = - \nabla f$. Beware!
