Solution (source code)

= Solution

For $n=1$, the <azimuthal unit vector> is $\hat\theta=(-\sin\theta,\cos\theta,0)$, so
$$
\boxed{F=\frac1r\hat\theta.}
$$
On a counterclockwise circle $C_r$ at fixed height, $dr=r\hat\theta\,d\theta$. Hence
$$
\boxed{\oint_{C_r}F\cdot dr=\int_0^{2\pi}\frac1r\,r\,d\theta=2\pi,}
$$
independent of the positive radius. Clockwise orientation reverses the sign.

There is no contradiction with the zero <curl> found in <8/c/i/solution>. The <vector field> is undefined on the axis, so it is not continuously differentiable on a disc spanning $C_r$; the hypotheses of <Stokes theorem> fail for that disc. It is smooth on a planar annulus excluding the axis, where <Stokes theorem> correctly gives zero: the two boundary <line integrals> cancel, $2\pi-2\pi=0$.

The same check works for general $n$. A counterclockwise circle has circulation $\Gamma(r)=2\pi r^{2-2n}$. Integrating the <curl> over an annulus $a\leq r\leq R$ gives, for $n\ne1$,
$$
\int_a^R2(1-n)r^{-2n}\,2\pi r\,dr
=2\pi\big(R^{2-2n}-a^{2-2n}\big)=\Gamma(R)-\Gamma(a).
$$
For $n=1$, both sides are zero. Thus all three preceding results are consistent with <Stokes theorem>; the necessary distinctions are the regularity of the <vector field> and inclusion of every oriented boundary component.