Why is this line integral not equal to 0? Given the vector field $$\textbf{F}(u,v)=\frac{av}{a^2u^2+v^2}\textbf{i}-\frac{au}{a^2u^2+v^2}\textbf{j}$$
I've calculated a potential function $$\psi(u,v)=\arctan{\frac{au}{v}}$$
whose gradient $\bf\nabla{\psi}$ is equal to $\textbf{F}(u,v)$. Since $\textbf{F}(u,v)$ can be represented as a gradient of a potential function, shouldn't it be conservative? Thus, shouldn't the circulation along any closed path
$$\oint_C \textbf{F}(u,v)\cdot d\textbf{r}$$
be equal to 0? I've been tasked to compute that integral along the unit circle, but it appears that the answer is not 0. Can someone help me to identify where my reasoning is wrong?
 A: You’ve clearly learned that an irrotational vector field is conservative, but there’s a catch: for this to be true, the domain must be simply-connected. In this case, the vector field $\mathbf F$ is irrotational, but it’s also undefined at the origin—its domain is the punctured plane $\mathbb R^2\setminus(0,0)$. This is not simply-connected, so you can’t expect that its integral over a path that surrounds this hole at the origin automatically vanishes.  
To get an idea of what’s going on, look at the simple case $a=-1$, so that $\mathbf F(u,v)={-v\over u^2+v^2}\mathbf i+{u\over u^2+v^2}\mathbf j$. If you sketch this vector field, you’ll see that although there’s no net circulation near any point at which the field is defined—i.e., it’s irrotational—there is a very obvious global circulation around the origin. As well, $\mathbf F$ is everywhere tangent to the unit circle and has constant magnitude along that curve, making $\mathbf F\cdot \mathrm d\mathbf r$ is a nonzero constant so that its integral will be nonzero. Specifically, using the obvious counterclockwise parameterization of the unit circle $C$, we have $$\oint_C\!\mathbf F\cdot\mathrm d\mathbf r = \int_0^{2\pi}\!(-\sin t\;\mathbf i+\cos t\;\mathbf j)\cdot(-\sin t\;\mathbf i+\cos t\;\mathbf j)\,dt = \int_0^{2\pi}\!dt = 2\pi.$$ A slightly more complicated calculation for the general case will produce a similar result.  
Note that your scalar potential $\psi(u,v) = \arctan\left({au\over v}\right)$ has some issues that prevent it from globally satisfying $\nabla\psi=\mathbf F$. A big problem is that it’s undefined along the line $v=0$. Moreover, this discontinuity isn’t removable: for fixed $u\ne0$, $\lim_{v\to0}\psi(u,v)$ doesn’t exist: the left and right limits have opposite signs. A function must be continuous to be differentiable, so this $\psi$ fails as a global antiderivative of $\mathbf F$.
