Is the field $F = \frac{1}{x^2 + y^2}(-y,x,0)$ conservative outside of the z-axis? 
Is the field $$F = \frac{1}{x^2 + y^2}(-y,x,0)$$ conservative outside of the z-axis, i.e $(x,y) \neq (0,0)$ 

I've found a potential function $U(x,y,z) = -arctan(\frac{x}{y}) + C$ which satisfies: 
$$(\frac{dU}{dx}, \frac{dU}{dy}, \frac{dU}{dz}) = F$$ since 
$$\frac{dU}{dx} = \frac{-y}{x^2 + y^2}$$
$$\frac{dU}{dy} = \frac{x}{x^2 + y^2}$$
$$\frac{dU}{dx} = 0$$
So my answer would be that $F$ is conservative, since I've satisifed the very definition of a conservative field, but the answer is that it is not. Why?
 A: Your potential function is not defined on all of $\Bbb R^3\setminus\{z\textrm{-axis}\}$: $\tan^{-1}\left(\frac{x}{y}\right)$ does not exist if $y = 0$. So, you've shown that if $D\subseteq\Bbb R^3$ is a domain whose intersection with the plane $y = 0$ is empty, $\left.\mathbf{F}\right|_D$ (the vector field restricted to $D$) is conservative. Similarly, you could construct a potential function away from the $x = 0$ plane.
The vector field above is closed (i.e. $\nabla\times\mathbf{F} = \mathbf{0}$), but a closed vector field is not necessarily conservative. The converse is true in two dimensions if the domain of definition of the vector field is simply connected and in three dimensions if the domain of definition is contractible, but $\Bbb R^3\setminus\{z\textrm{-axis}\}$ (the domain of $\mathbf{F}$) is not simply connected (hence not contractible), so even though the vector field is closed, it need not be conservative. And indeed, it isn't: if you compute the line integral over the unit circle in the $z = C$ plane centered at $(0,0)$, you will obtain a nonzero answer, which shows that $\mathbf{F}$ cannot be conservative on any domain containing $(0,0,C)$ for any $C$.
However, there is good news. If you restrict your vector field to any simply connected domain which avoids the $z$-axis, your restricted vector field will be conservative. You can construct a potential function on this domain much like you did with $\tan^{-1}(x/y)$, although you will need to be a little careful in constructing the potential function if the domain intersects both the $x = 0$ plane and the $y = 0$ plane.
