The hamiltonian of the electrons in an He atom, in CGS units, is $$ \hat{H} = -\frac{\hslash^2}{2m}\left(\nabla_1^2 + \nabla_2^2\right) - Ze^2\left(\frac{1}{r_1} + \frac{1}{r_2}\right) + \frac{e^2}{r_{12}^2}, $$ where $m$ is the electronic mass, $e$ the electronic charge, $Z$ the atomic number, $\vec{x}_1$ and $\vec{x}_2$ are the position vectors of the two electrons and the subscript on $\nabla$ indicates the derivative with respect to $\vec{x}_1$ or $\vec{x}_2$. $r_1$ and $r_2$ are the magnitudes of $\vec{x}_1$ and $\vec{x}_2$ and $r_{12} = |\vec{x}_1 - \vec{x}_2|$. The usual variational treatment to get the approximate ground state energy gives only the upper bound to the energy. One can get the lower bound as well using the technique suggested in section 26e of Linus Pauling's 'Introduction to Quantum Mechanics'. If one follows that method, one gets an integral of the form $$\tag{1} \int_{-\infty}^\infty\int_{-\infty}^\infty \frac{|\phi|^2}{r_{12}^2}dV_1 dV_2, $$ where the trial function is $$ \phi(\vec{x}_1, \vec{x}_2) = \frac{\alpha^3}{\pi a_0^3}\exp\left(-\frac{\alpha}{a_0}(r_1 + r_2)\right). $$ Here $a_0$ is the radius of the first Bohr orbit of a hydrogen atom and $\alpha$ is the variational parameter.
I am not able to carry out the integration in equation (1). If the integrand were $|\phi|^2/r_{12}$ one can express $1/|r_{12}|$ in terms of Legendre functions and evaluate the integral. However, following the same trick in the case of (1) leads to integrals that do not converge.
Is there another way to evaluate (1)? One might come across integrals of this kind in electrodynamics as well.
The expansion of $1/|r_{12}|$ in terms of Legendre functions is $$ \frac{1}{|r_{12}|} = \begin{cases} \frac{1}{r_2}\sum_{n=0}^\infty \left(\frac{r_1}{r_2}\right)^nP_n(\cos\theta) & \;\text{if}\; 0 < r_1 \le r_2 \\ \frac{1}{r_1}\sum_{n=0}^\infty \left(\frac{r_2}{r_1}\right)^nP_n(\cos\theta) & \;\text{if}\; r_2 \le r_1 < \infty. \end{cases} $$
The integral with $1/r_{12}$ also appears in the calculation and I evaluated it elsewhere.