Exterior harmonic potential with no flux through a sphere (source code)

= Exterior harmonic potential with no flux through a sphere
{title2=$U=v_0(r+r_0^3/(2r^2))\cos\theta$}

An axisymmetric harmonic potential outside a sphere of radius $r_0$, with far field $v_0r\cos\theta$ and zero radial derivative on the sphere, is
$$
U=v_0(r+r_0^3/(2r^2))\cos\theta.
$$
The regular spherical expansion in <Legendre polynomials> fixes all coefficients. A spatial constant remains arbitrary if only the far-field gradient is specified, and is fixed by prescribing the potential difference at infinity.