On $\mathbb{R}^2\setminus \{(0,0)\}$ and for real $p$ let $v_p$ be the vector field: $$ v_p(x,y):=\left(\frac{-y}{(x^2+y^2)^p}, \frac{x}{(x^2+y^2)^p}\right)$$ For which $p>0$ is there an open set $U\subseteq \mathbb{R}^2\setminus \{(0,0)\}$ such, that $v_p$ has an anti-derivative on U? For these p, give U and an anti-derivative of $v_p$.
This is an old exam question, which I think I've got all wrong. My Solution attempt: Check whether the path integral for the path $\gamma: [0,2\pi] \rightarrow \mathbb{R}^2$defined as $$\gamma(t) = \big(\sin(t), -\cos(t)\big)^t$$ vanishes. It doesn't, for any p, as it is always equal to $2\pi$. But I feel I have misunderstood the idea of the problem...
Note that if $v_p=\nabla\phi$ then $\partial_y(v_p)_1=\partial_x(v_p)_2$, i.e. $$\frac{-x^2+(2p-1)y^2}{x(x^2+y^2)^{p+1}}=-\partial_y y(x^2+y^2)^{-p}=\partial_x x(x^2+y^2)^{-p}=\frac{(1-2p)x^2+y^2}{x(x^2+y^2)^{p+1}},$$which simplifies to $p=1$. Indeed, in that case we may take $$\phi=\arctan\frac{y}{x}.$$Your path integral approach failed because of the jump discontinuity in $\phi$ at $x=0$.