Solution (source code)

= Solution
{c}

The displayed <vector field> is defined on the punctured plane $U=\mathbb R^2\setminus\{(0,0)\}$; it is undefined at the origin. Take the counterclockwise unit <circle> $\mathbf r(t)=(\cos t,\sin t)$, $0\leq t\leq2\pi$. Along it,
$$
\mathbf F(\mathbf r(t))=(-\sin t,\cos t)=\mathbf r'(t),\qquad
\boxed{\oint_C\mathbf F\cdot d\mathbf r=\int_0^{2\pi}1\,dt=2\pi.}
$$
By the <fundamental theorem for line integrals>, it has no single-valued <potential of a conservative vector field> on $U$. In particular it cannot be the restriction of the <gradient> of a <smooth function> on all of $\mathbb R^2$.

For $(x,y)\ne(0,0)$, direct differentiation gives
$$
\frac{\partial Q}{\partial x}
=\frac{x^2+y^2-2x^2}{(x^2+y^2)^2}
=\frac{y^2-x^2}{(x^2+y^2)^2}
=\frac{\partial P}{\partial y}.
$$
There is no contradiction with <Green's theorem>: $\mathbf F$ is not defined, let alone continuously differentiable, throughout the disk enclosed by $C$. On an annulus the theorem does apply; the counterclockwise outer integral is $2\pi$, and the clockwise inner integral is $-2\pi$, so their sum is zero. The hole prevents this <curl-free vector field> from being a <conservative vector field> on its entire domain.