Solution (source code)

= Solution

A single-valued potential must be $2\pi$-periodic in $\theta$. For a separated solution $\Phi=F(r)H(\theta)$, the <Laplace equation in polar coordinates> becomes
$$
\frac{r(rF')'}F=-\frac{H''}H=\mu.
$$
The periodic angular <eigenvalue problem> has $\mu=n^2$, $n\geq0$: its nonconstant <eigenfunctions> are $\cos n\theta,\sin n\theta$. Negative $\mu$ gives exponentials that cannot be periodic, and $\mu=0$ gives only a constant angular factor. For $n\geq1$, the radial <Cauchy-Euler equation> $r^2F''+rF'-n^2F=0$ gives $F=Ar^n+Br^{-n}$. At $n=0$ the two radial solutions are $1$ and $\log r$. <Superposition> therefore gives
$$
\boxed{\Phi=A_0+B_0\log r+\sum_{n=1}^{\infty}\left[(A_nr^n+B_nr^{-n})\cos n\theta+(C_nr^n+D_nr^{-n})\sin n\theta\right].}
$$
The expansion is interpreted on an annulus where the <harmonic function> is defined; particular <boundary conditions> determine its constants and convergence region. Single-valuedness is essential: allowing a cut in the angular domain would also permit nonperiodic angular solutions.