Calculation double Integral over Ball (optical size) I hope that someone can help me with the following problem.
I have to show that
$$\int_{B_1(0)}\int_{B_1(0)}\frac{1}{|x-y|^2}dxdy=4\pi^2~,$$
with $B_1(0)\subset\mathbb{R}^3$.
I have no idea how to calculate those integrals, the common(for me) tricks won't help.
The integral is connected with the mean inverse squared distance between two points within a unit ball.
Following the method used by Christian Blatter in this post we have that,
$$\begin{align*}
\int_{B_1(0)}\int_{B_1(0)}\frac{1}{|x-y|^2}dxdy
&amp;=|B_1(0)|^2
\int_0^1\int_0^1\int_0^\pi \frac{f_R(r) f_S(s)f_\Theta(\theta) \ d\theta\ ds\ dr}{r^2+s^2-2rs\cos\theta}\\
&amp;=\left(\frac{4\pi}{3}\right)^2
\int_0^1\int_0^1\int_0^\pi \frac{3r^2\cdot 3s^2\cdot1/2\sin(\theta) \ d\theta\ ds\ dr}{r^2+s^2-2rs\cos\theta}\\
&amp;=8\pi^2
\int_0^1\int_0^1r^2 s^2\left(\int_0^\pi \frac{\sin(\theta) \ d\theta}{r^2+s^2-2rs\cos\theta}\right)\ ds\ dr\\
&amp;=4\pi^2
\int_0^1r\left(\int_0^1 s\ln\left(\frac{(r+s)^2}{(r-s)^2}\right)\ ds\right)\ dr\\
&amp;=4\pi^2
\int_0^1r\left(\ln\left(\frac{1+r}{1-r}\right)(1-r^2)+2r\right)\ dr\\
&amp;=4\pi^2.
\end{align*}$$
and we are done.
I assume that $B_1(0)$ is the ball of radius $1$ about the origin.
Since this space has nice spherical symmetry, it will probably be
easier to convert to spherical coordinates. Let our change of coordinate
map be
$$ H(\rho,\theta,\phi)
   = (\rho\cos\theta\cos\phi,
      \rho\sin\theta\cos\phi,
      \rho\sin\phi), \qquad
      \rho \in [0,1], \theta \in [0,2\pi], \phi \in [-\pi/2,\pi/2] $$
so we wish to integrate
$$ \int_{-\pi \over 2}^{\pi \over 2}
   \int_0^{2\pi}\!\!\!\int_0^1
   {1 \over |r\cos\theta\cos\phi-r\sin\theta\cos\phi|^2}
   \thinspace r^2\cos\phi\thinspace drd\theta d\phi $$
Now absolute value is usually defined as $|x|=\sqrt{x^2}$, so we have
$$ \begin{align}
|r\cos\theta\cos\phi-r\sin\theta\cos\phi|^2
   &amp;= r^2\cos^2\theta\cos^2\phi
      + r^2\sin^2\theta\cos^2\phi-2r^2\cos^2\phi\sin\theta\cos\theta \\\
   &amp;= r^2\cos^2\phi(1- 2\sin\theta\cos\theta)
\end{align}$$
Then our integral is
$$ \int_{-\pi \over 2}^{\pi \over 2}
   \int_0^{2\pi}\!\!\!\int_0^1
   {1 \over r^2\cos^2\phi(1- 2\sin\theta\cos\theta)}
   \thinspace r^2\cos\phi\thinspace drd\theta d\phi $$
easily simplifying to
$$ \int_{-\pi \over 2}^{\pi \over 2}
   \int_0^{2\pi}\!\!\!\int_0^1
   {1 \over \cos\phi}{1 \over (1- 2\sin\theta\cos\theta)}
   \thinspace drd\theta d\phi $$
Clearly $r$ integrates out. By the standard tricks,
$$ \int {1 \over \cos x}\thinspace dx = \log(\tan x + \sec x) $$
and
$$ \int {1 \over 1-2\sin x \cos x} = {\sin x \over \cos x - \sin x} $$
So the antidifferentiation results in
$$ \begin{align}
   &amp;\log(\tan\phi-\sec\phi)\bigg|_{-\pi \over 2}^{\pi \over 2}
   \times {\sin \theta \over \cos \theta - \sin\theta}\bigg|_0^{2\pi} \\
\end{align} $$
which is not defined. Hence the integral does not exist.