Alright, so the field is \mathbf{F} = (z^2 + 2xy,x^2,2xz)
it's a gradient only when f_x = z^2 + 2xy, f_y = x^2 and f_z = 2xz
integrate the first equation with respect to x to get f(x,y,z) = \int z^2 +2xy\,dx = xz^2 + x^2y + g(y,z)
now, f_z(x,y,z) = g_z(y,x) which is 2xz
integrate that with...