Solution (source code)

= Solution

In <electrostatics>, <Gauss's law> is
$$
\boxed{\oint_{\partial\Omega}\mathbf E\cdot d\mathbf A=\frac{Q_{\mathrm{enc}}}{\epsilon_0},\qquad \boldsymbol\nabla\cdot\mathbf E=\frac\rho{\epsilon_0}.}
$$
The surface normal points outward. <Spherical symmetry> makes the field radial and constant in magnitude on a concentric <Gaussian> surface.

For a uniformly charged sphere, enclosed charge is $4\pi\rho_0r^3/3$ inside and $Q=4\pi\rho_0R^3/3$ outside. Thus the radial field is
$$
\boxed{E_r(r)=\begin{cases}\displaystyle\frac{\rho_0r}{3\epsilon_0},&0\leq r\leq R,\\[4pt]\displaystyle\frac{\rho_0R^3}{3\epsilon_0r^2},&r\geq R.\end{cases}}
$$
Set potential zero at infinity. Outside, $V=Q/(4\pi\epsilon_0r)$. Inside, integrate $dV/dr=-E_r$ from the known boundary value, obtaining
$$
\boxed{V(r)=\begin{cases}\displaystyle\frac{\rho_0}{6\epsilon_0}(3R^2-r^2),&r\leq R,\\[4pt]\displaystyle\frac{\rho_0R^3}{3\epsilon_0r},&r\geq R.\end{cases}}
$$
The field rises linearly from zero to its maximum at $R$, then falls as $r^{-2}$. The potential falls quadratically from $\rho_0R^2/(2\epsilon_0)$ to its surface value and then as $r^{-1}$. Both are continuous at the surface; there is no separate sheet of surface charge.

\Image[/past-exam-of-the-physics-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2017-uniform-sphere.png]
{title=Radial field and potential of a uniformly charged solid sphere}

For the <electric field of a hydrogen ground-state electron cloud>, its enclosed charge is
$$
Q_e(r)=4\pi\int_0^r s^2\rho(s)\,ds=-\frac{4e}{a_0^3}\int_0^r s^2e^{-2s/a_0}\,ds.
$$
Writing $u=2s/a_0$ and using $\int u^2e^{-u}du=-e^{-u}(u^2+2u+2)$ gives
$$
Q_e(r)=-e\left[1-e^{-2r/a_0}\left(1+\frac{2r}{a_0}+\frac{2r^2}{a_0^2}\right)\right].
$$
The total electron-cloud charge tends to $-e$, as required. Dividing by $4\pi\epsilon_0r^2$ yields
$$
\boxed{E_{e,r}(r)=\frac e{4\pi\epsilon_0}\left[\frac{e^{-2r/a_0}-1}{r^2}+\frac{2e^{-2r/a_0}}{a_0r}+\frac{2e^{-2r/a_0}}{a_0^2}\right].}
$$
The expression is negative and therefore points inward. Its apparently singular terms cancel at small radius, leaving $E_{e,r}\simeq-er/(3\pi\epsilon_0a_0^3)$.

A distant external charge polarizes the neutral atom. Its <electric field> displaces the positive and negative charge distributions relative to one another, giving an induced dipole $\mathbf p=\alpha\mathbf E_{\mathrm{ext}}$ with static <electric polarizability> $\alpha>0$. The field is stronger on the nearer side, so the opposite-charge attraction exceeds the like-charge repulsion. This is <charge-induced dipole attraction>, not a net monopole charge on the atom.

Quantitatively, for external charge $Q=\pm e$ at separation $r$, the <polarization> <energy> is $U=-\alpha E_{\mathrm{ext}}^2/2$, hence
$$
\boxed{U(r)=-\frac{\alpha Q^2}{2(4\pi\epsilon_0)^2r^4},\qquad F_r=-\frac{dU}{dr}=-\frac{2\alpha Q^2}{(4\pi\epsilon_0)^2r^5}.}
$$
Here negative $F_r$ means decreasing separation. Reversing the external charge reverses the induced dipole but leaves this leading long-range <force> attractive and of the same magnitude. The factor one half accounts for the <energy> cost of inducing the dipole.

The supplied charge density describes the unperturbed atom. Adding its electron field to the nucleus field leaves $E_{\mathrm{atom}}=e e^{-2r/a_0}(r^{-2}+2/(a_0r)+2/a_0^2)/(4\pi\epsilon_0)$, an exponentially small residual because the cloud has an infinite tail. A completely frozen density would give only that tiny sign-dependent <force>. Allowing <polarization> is essential to obtain the dominant attractive power-law <force> for either sign of external charge when $r\gg a_0$.