Checking whether $\int_{B(0,r)} \int_{B(0,r)} \ln(\|x-y\|)dxdy > 0$? Today I was discussing with a classmate about the sign of the integral
$$\int_{B(0,r)} \int_{B(0,r)} \ln(\|x-y\|)dxdy,$$
where $B(0,r)$ denotes the ball of center $0$ and radius $r$ in $\mathbb{R^2}$. My friend said that this integral is negative for every $r>0$ because the function $\ln |x-y|$ is "very negative" at $x=y$. I don't agree and I told him that I think there exists a critical $r$ from which the integral is positive. However, I don't know how to prove it. I rewrite it by using polar coordinates as
$$\int_0^r\int_0^r\int_0^{2\pi}\int_0^{2\pi} \ln(\sqrt{r_1^2+r_2^2-2r_1r_2\cos(t_1-t_2)})r_1r_2dt_1dt_2dr_1dr_2.$$
I computed this integral with the software Mathematica and I obtained positive values with, for example, $r=2$. However, this proof is not valid for my friend. Does anyone know how to prove it rigorously?
 A: Let $A = \int_{B(0,1)} \ln(\|x\|)dx$ and choose $r$ so that $\pi r^2 \gt 4\pi + \frac{|A|}{\ln 2}$.
For any fixed $y \in B(0,r)$, write $$B_1= \{x \in B(0,r):\|x-y\|\le 1 \}$$ and $$B_2= \{x \in B(0,r):\|x-y\|\ge 2 \}$$
Then we have:
$$\int_{B(0,r)} \ln(\|x-y\|)dx \ge \int_{B_1} \ln(\|x-y\|)dx + \int_{B_2} \ln(\|x-y\|)dx
$$
$$\ge \int_{B(0,1)} \ln(\|x|)dx + \int_{B_2}(\ln 2) dx$$
$$\ge A + (\pi r^2 - 4\pi)(\ln 2) \gt 0$$
With $C = A + (\pi r^2 - 4\pi)(\ln 2)$, this implies: $$\int_{B(0,r)} \int_{B(0,r)} \ln(\|x-y\|)dxdy \gt \int_{B(0,r)} C dy = \pi r^2 C \gt 0$$
Now observe that the function $$f(r) = \int_{B(0,r)} \int_{B(0,r)} \ln(\|x-y\|)dxdy$$
is continuous, $f(1) \lt 0$ and, by the above calculations, $f(r) \gt 0$ for large enough $r$, so there is a minimum value $r_0$ where $f(r_0) = 0$ and it's easy to see that $f(r) \gt 0$ for all $r \gt r_0$
A: First note that
\begin{align}
\int \limits_0^{2\pi} \int \limits_0^{2\pi} f(\cos(t_1 - t_2)) \, \mathrm{d} t_1 \mathrm{d} t_2 &= \int \limits_0^{2\pi} \int \limits_{-t_2}^{2\pi-t_2} f(\cos(s)) \, \mathrm{d} s \, \mathrm{d} t_2 = \int \limits_0^{2\pi} \int \limits_0^{2\pi} f(\cos(s)) \, \mathrm{d} s \, \mathrm{d} t_2 \\
&= 2 \pi \int \limits_0^{2\pi} f(\cos(s)) \, \mathrm{d} s = 4 \pi \int \limits_0^\pi f(\cos(s)) \, \mathrm{d} s
\end{align}
holds for any $f$ for which the integral exists. This allows us to rewrite your integral as
\begin{align}
I (r) &\equiv \int \limits_{\mathrm{B}(0,r)} ~ \int \limits_{\mathrm{B}(0,r)} \ln(\lVert x - y \rVert) \, \mathrm{d} x \, \mathrm{d} y = 2 \pi \int \limits_0^r \int \limits_0^r \int \limits_0^{\pi} \ln(r_1^2 + r_2^2 - 2 r_1 r_2 \cos(s)) r_1 r_2 \, \mathrm{d} s \, \mathrm{d} r_1 \mathrm{d} r_2 \\
&= 2 \pi \int \limits_0^r \int \limits_0^r \int \limits_0^{\pi} \left[2\ln(\max(r_1,r_2)) \vphantom{\frac{\min^2(r_1,r_2)}{\max^2(r_1,r_2)}} \right. \\
&\phantom{{} = 2 \pi \int \limits_0^r \int \limits_0^r \int \limits_0^{\pi} \left[\vphantom{\frac{\min^2(r_1,r_2)}{\max^2(r_1,r_2)}} \right.} \left. + \ln \left(1 + \frac{\min^2(r_1,r_2)}{\max^2(r_1,r_2)} - 2 \frac{\min(r_1,r_2)}{\max(r_1,r_2)} \cos(s) \right)\right]  r_1 r_2 \, \mathrm{d} s \, \mathrm{d} r_1 \mathrm{d} r_2 \, .
\end{align}
The $s$-integral of the first term in the square brackets is trivial, the integral of the second term is zero (see this question). Therefore,
\begin{align}
I (r) &= 4 \pi^2 \int \limits_0^r \int \limits_0^r \ln(\max(r_1,r_2)) r_1 r_2 \, \mathrm{d} r_1 \mathrm{d} r_2 = 8 \pi^2 \int \limits_0^r \int \limits_0^{r_2} \ln(r_2) r_1 r_2 \, \mathrm{d} r_1 \mathrm{d} r_2\\
&= 4\pi^2 \int \limits_0^r \ln(r_2) r_2^3 \, \mathrm{d}r_2 = \pi^2 \left(r^4 \ln(r) - \int \limits_0^r r_2^3 \, \mathrm{d}r_2\right) = \pi^2 r^4 \left[\ln(r) - \frac{1}{4}\right] .
\end{align}
There is indeed a critical value $r_\text{c} = \mathrm{e}^{1/4}$ such that $I(r) < 0$ for $r < r_\text{c}$ and $I(r) > 0$ for $r > r_\text{c}$.
