Find the potential function f for the field F

$\displaystyle F=\frac{1}{z}i-6j-\frac{x}{z^{2}}k$

We're assuming that it has already been shown that the field is conservative.

I don't think I'm quite understanding how to do this.

So far, I have:

$\displaystyle \frac{\partial f}{\partial x}=\frac{1}{z}$

$\displaystyle \frac{\partial f}{\partial y}=-6$

$\displaystyle \frac{\partial f}{\partial z}=-\frac{x}{x^{2}}$

So, then I take the first one and integrate it with respect to x and get:

$\displaystyle f(x,y,z)=\frac{x}{z}+g(y,z)$

Then I find:

$\displaystyle \frac{\partial f}{\partial y}=\frac{x}{z}+g(y,z)$

$\displaystyle =>0+\frac{\partial g}{\partial y}$

and set this equal to $\displaystyle \frac{\partial f}{\partial y}$ from above:

$\displaystyle \frac{\partial g}{\partial y}=-6$

So I take the integral of this and get:

$\displaystyle -6y+h(z)$

I'm not sure of what to do now.

The final answer to the problem is $\displaystyle \frac{x}{z}-6y+C$