Solution (source code)

= Solution

On $C$, $dx=a e_\phi d\phi$, so $I=\int_0^{2\pi}d\phi=2\pi$. Locally $f=\phi$, but no single-valued global potential exists on the punctured domain; this is why irrotationality does not force this closed <integral> to vanish.