Solution (source code)

= Solution

Set $\phi=R(r)\Theta(\theta)$ in <Laplace's equation>. Separation gives $\Theta''+n^2\Theta=0$ and $r^2R''+rR'-n^2R=0$. Single-valued angular periodicity requires integer $n\geq0$. For $n>0$ the radial factors are $r^n,r^{-n}$; for $n=0$ they are $1,\ln r$. A term linear in $\theta$ is excluded by periodicity. Thus the <harmonic Fourier expansions in planar concentric domains> have the general form
$$
\phi=A+B\ln r+\sum_{n\geq1}[r^n(A_n\cos n\theta+B_n\sin n\theta)+r^{-n}(C_n\cos n\theta+D_n\sin n\theta)].
$$
For $0<a<b$, the specified boundaries contain only a constant mode and a first cosine mode. The <two-boundary annular harmonic interpolation> gives
$$
\boxed{\phi(r,\theta)=U\frac{\ln(b/r)}{\ln(b/a)}+V\frac{b}{b^2-a^2}\left(r-\frac{a^2}{r}\right)\cos\theta.}
$$
At $r=a$, the cosine term vanishes and the logarithmic term is $U$; at $r=b$, the first term vanishes and the cosine amplitude is $V$. Each component is harmonic, and the <maximum principle> ensures uniqueness for these continuous <Dirichlet boundary conditions>.