Angular circulation obstruction to a cylindrical potential (source code)

= Angular circulation obstruction to a cylindrical potential
{title2=$\oint\mathbf F\cdot d\mathbf r=\int_{-\pi}^{\pi}g(\theta)\,d\theta$}

Let $g$ be a continuous $2\pi$-<periodic function> and $\mathbf F=g(\theta)\mathbf e_\theta/r$ on $r>0$. On a <circle> about the axis, $d\mathbf r=r\mathbf e_\theta\,d\theta$, giving the displayed <line integral>. A single-valued <potential of a conservative vector field> on the full punctured space exists if and only if this <integral> is zero. Necessity is the <fundamental theorem for line integrals>. For sufficiency, the primitive $P(\theta)=\int_0^\theta g(s)\,ds$ is $2\pi$-periodic when the mean is zero, and the <gradient in cylindrical coordinates> gives $\nabla P=\mathbf F$.

On a domain with one angular cut removed, the same primitive gives a <potential of a conservative vector field> even when the mean is nonzero, because the angle has a single-valued continuous branch there. For example $g(\theta)=\sqrt{1+\cos\theta}$ has <integral> $4\sqrt2$ around the full <circle> but primitive $2\sqrt2\sin(\theta/2)$ on $-\pi<\theta<\pi$.