Closed line integral of conservative field not zero? show that if $\mathbf{F}(x,y)=\frac{-y\mathbf{i}+x\mathbf{j}}{x^2+y^2}$, then $\oint\mathbf{F}\dot{}d\mathbf{r}=a\pi$ for every
simple closed path that encloses the origin. Find the constant $a$.
I first calculated the curl of the vector field and it was $\mathbf{0}$. Which means that there exists a scalar field $f$ such that $\mathbf{F}=\nabla f$ So the integral becomes $\oint\mathbf{\nabla }f\dot{}d\mathbf{r}=f(\mathbf{r(a)}-f(\mathbf{r(a)})=0)$ and Hence $a=0$.. But apparently the mark scheme says it should be $a=2$. Any idea where I am going wrong? 
 A: What is wrong in the argument is that the condition $$\operatorname{curl} {\bf G} = 0 ,$$ where we denote $$\operatorname{curl} (P(x, y) {\bf i} + Q(x, y) {\bf j}) := \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}$$
is not actually sufficient to guarantee that $\bf G$ is conservative. Indeed, the given vector field, $${\bf F} := \frac{1}{x^2 + y^2} (-y {\bf i} + x {\bf j}) ,$$ sometimes called the vortex vector field is the standard counterexample (the reason for this name becomes apparent when plotting it).
The correct statement is:

Theorem If a vector field $\bf G$ with domain $U \subseteq \Bbb R^2$ satisfies $\operatorname{curl} {\bf G} = 0$ and $U$ is simply connected, then $\bf G$ is conservative, that is, there is a function $g$ such that ${\bf G} = \nabla g$.

Informally, a space is simply connected iff it has no holes (but see the linked wiki article for more).
The domain of the vortex vector field $\bf F$ is $\Bbb R^2 - \{ {\bf 0} \}$, which is not simply connected, and therefore the theorem does not apply. Indeed, the conclusion (as the mark scheme points out) does not hold: Taking a path that encloses $\bf 0$, for example, the unit circle oriented clockwise and traversed once, and using the standard parameterization, $\gamma(t) := (\cos t, \sin t)$, $t \in [0, 2 \pi]$, we compute
$$\oint_{\gamma} {\bf F} \cdot d{\bf s} = \int_0^{2 \pi} {\bf F}(\gamma(t)) \cdot \gamma'(t) \,dt = \int_0^{2 \pi} dt = 2 \pi .$$ On the other hand, if ${\bf F}$ were conservative, we would have $\oint_\gamma {\bf F} \cdot d{\bf s} = 0$, a contradiction.
Remark On the other hand, if we restricted $\bf F$ to some simply connected subset, say, the slit plane $$V := \Bbb R^2 \setminus ((-\infty, 0] \times \{0\}) ,$$ then the theorem applies to the restriction of ${\bf F}$ to that set, and hence that restriction is conservative. One potential $f$ of ${\bf F}|_V$ is the function that returns the signed angle from the positive $x$-axis to the line segment from $\bf 0$ to $(x, y)$. In the usual polar coordinates $(r, \theta)$ on $V$, $f$ is just the angle coordinate function $\theta$, and it is also (the restriction to $V$ of) the 2-argument arctangent, $\operatorname{atan2}(y, x)$. In particular, $f$ coincides on the half-plane $\{x > 0\}$ with the perhaps more familiar function $\arctan \frac{y}{x}$.
A: We have that:
$$ \vec F(x,y) =
   \Bigl(P(x,y), Q(x,y) \Bigr) =
   \biggl(-\cfrac{y}{x^2+y^2}, \cfrac{x}{x^2+y^2}\biggr) \;,\; (x,y) \neq \vec 0
$$
We can see that $ P, Q $ are continuously differentiable and
$ P_y(x,y)=Q_x(x,y) \; \; \forall \; \; (x,y) \neq \vec 0 $.
Given the above facts and applying Green's theorem it can be easily proved that
$$  \oint_{c_1} \vec F \: d \vec s = \oint_{c_2} \vec F \: d \vec s $$
, where $c_1, c_2$ two simple closed curves enclosing the origin.
As a result, we can use the unit circle $C$, centered at the origin $ (0,0) $, where 
$C$ is given by $$ \vec r(t) = (\cos t, \sin t) \;, \; t \in [0,2π] $$
, in order to calculate the value of the requested line integral.
Therefore,
$$  
   \oint_c \vec F \: d \vec s = 
   \int_0^{2π} \vec F \bigl(\vec r(t) \bigr) \vec r'(t) \: dt =
   \int_0^{2π} (-\sin t, \cos t)^2 \; dt = 
   \int_0^{2π}dt = 2π
$$
, for every simple closed path that encloses the origin. So $a=2$.
