Solution (source code)

= Solution
{c}

On a <sphere> of radius $r$, the radial <gravitational field> has constant magnitude. Thus <Gauss's law for gravity> becomes
$$
4\pi r^2\varphi'(r)=-4\pi GM(r),\qquad
\varphi'(r)=-\frac{GM(r)}{r^2},
$$
where $M(r)$ is the enclosed <mass>. In the hollow core $M(r)=0$. In the material shell, put $u=r/r_0$ and use the <spherical coordinates> volume element:
$$
\begin{aligned}
M(r)&=4\pi\rho_0r_0\int_{r_0}^r s e^{-s/r_0}\,ds\\
&=4\pi\rho_0r_0^3\int_1^u v e^{-v}\,dv
=4\pi\rho_0r_0^3\left[\frac2e-(u+1)e^{-u}\right],\qquad 1\leq u\leq2.
\end{aligned}
$$
Outside the shell the enclosed <mass> is the total
$$
M_*=4\pi\rho_0r_0^3\left(\frac2e-\frac3{e^2}\right).
$$
Consequently,
$$
\boxed{\varphi'(r)=
\begin{cases}
0,&0\leq r<r_0,\\
-\dfrac{4\pi G\rho_0r_0^3}{r^2}\left[\dfrac2e-\left(1+\dfrac r{r_0}\right)e^{-r/r_0}\right],&r_0\leq r\leq2r_0,\\
-\dfrac{4\pi G\rho_0r_0^3}{r^2}\left(\dfrac2e-\dfrac3{e^2}\right),&r>2r_0.
\end{cases}}
$$
At $r=0$ the displayed value refers to the radial <derivative> of the constant core value. The expressions match at both shell boundaries. There is no surface sheet of <mass>, so a jump in the volume <mass density> does not produce a jump in the <gravitational field>. The core has zero <gravitational field>, and the exterior <gravitational field> equals that of a central <point mass> $M_*$, as in the <shell theorem>.