Newtonian gravitational potential of a uniform solid sphere (source code)

= Newtonian gravitational potential of a uniform solid sphere
{c}
{title2=$\Phi(r)=-GM(3R^2-r^2)/(2R^3)\quad(r\leq R)$}

For radius $R$, constant <mass density> $\rho$ and $M=4\pi\rho R^3/3$, normalize the <Newtonian gravitational potential> to zero at infinity. Then
$$
\boxed{\Phi(r)=\begin{cases}-\dfrac{GM}{2R^3}(3R^2-r^2),&0\leq r\leq R,\\-GM/r,&r\geq R.\end{cases}}
$$
By the <spherical shell theorem>, each spherical shell contributes the potential of a point mass outside it and a constant inside it. Summing inner and outer shells gives $\Phi(r)=-4\pi G\rho[r^2/3+(R^2-r^2)/2]$ inside. Equivalently, angular integration of the free-space <Green function of the Laplacian> gives $\int_{-1}^1(r^2+r'^2-2rr'\mu)^{-1/2}d\mu=[r+r'-|r-r'|]/(rr')$. The resulting radial integral has the same value.

The potential and its first radial derivative are continuous at $R$. The interior <gravitational acceleration> is $-\nabla\Phi=-(GM/R^3)\mathbf r$, and $\nabla^2\Phi=4\pi G\rho$. At the centre $\Phi(0)=-3GM/(2R)$ while its gradient vanishes.