Solution (source code)

= Solution

The <divergence theorem> states $\int_V\nabla\cdot\mathbf F\,dV=\oint_{\partial V}\mathbf F\cdot\mathbf n\,dS$. With the <Poisson equation for Newtonian gravity>, this gives
$$
\oint_{\partial V}\nabla\phi\cdot\mathbf n\,dS=4\pi GM(V),
$$
or gravitational-acceleration flux $\oint\mathbf g\cdot\mathbf n\,dS=-4\pi GM(V)$.

Use cylindrical radius $R=r\sin\theta$, so $r(1+|\cos\theta|)=r+|z|$. An arbitrary reference length in the logarithm only adds a constant potential. Off the equatorial plane, the radial part of $\nabla^2\log[r(1+|\cos\theta|)]$ is $1/r^2$. Writing $c=\cos\theta$, its angular part is $r^{-2}d[(1-c^2)d\log(1+|c|)/dc]/dc=-1/r^2$ on either open hemisphere. The two cancel: there is no volume density away from $z=0$.

At the plane, $\partial_z\phi|_{0^+}=v_0^2/R$ and $\partial_z\phi|_{0^-}=-v_0^2/R$. Applying the gravitational flux law to a thin pillbox gives $4\pi G\Sigma=\partial_z\phi|_{0^+}-\partial_z\phi|_{0^-}$. Consequently
$$
\boxed{\Sigma(R)=\frac{v_0^2}{2\pi GR},\qquad
\rho(R,z)=\frac{v_0^2}{2\pi GR}\delta(z).}
$$
This is the <Mestel disk potential-density pair>. There is no additional point mass at the origin: the enclosed mass tends to zero linearly as the enclosing radius shrinks.

At $z=0$, $\phi=v_0^2\log R$ up to a constant, so radial circular balance gives
$$
\boxed{v_{\mathrm{circ}}^2=R\,\partial_R\phi=v_0^2.}
$$
On a sphere of radius $r$, $\partial_r\phi=v_0^2/r$ at every nonsingular angular point. Its flux is $4\pi v_0^2r$, and hence
$$
\boxed{M(<r)=\frac{v_0^2r}{G}.}
$$
Direct integration of the <surface density> confirms $2\pi\int_0^r\Sigma(R)R\,dR=v_0^2r/G$. Thus $v_{\mathrm{circ}}^2=GM(<r)/r$ even though the source is a <razor-thin disk>. This equality is a special scale-free property of the <Mestel disk>, not evidence that the source is spherical. In a general disk, matter outside the orbit and nonspherical interior forces prevent this enclosed-mass formula for the local <circular speed>. The model has infinite total mass, so its potential is defined by differences rather than a zero at infinity.