Does this function belong to $L^1(S\times S)$? I was thinking about how to prve that the integral $\int_S\int_S \ln|(x_1,x_2)-(y_1,y_2)|d(x_1,x_2)d(y_1,y_2)$ is finite, where $S$ is a compact region in $\mathbb{R^2}$.
My attempt:
I am trying to prove that the map $S\to\mathbb{R},\;(x_1,x_2)\mapsto  \int_S \ln|(x_1,x_2)-(y_1,y_2)|d(y_1,y_2) $ is uniformly bounded. In a simpler case I supposed that $S$ is a  disk of centre $0$ and radius $R$. In this case, we can use polar coordinates and rewrite the integral as
$$\int_0^{2\pi}\int_0^Rr\ln(\sqrt{x_1^2+x_2^2+r^2+2x_1r\cos(\theta)+2x_2r\sin(\theta)})drd\theta.$$
However, I don't know that this is uniformly bounded in $(x_1,x_2)\in S$.
I am very lost with this question so any help will be welcome.
 A: Hint: Write $x=(x_1,x_2)$, $y=(y_1,y_2)$. Consider $$ I(x) = \int_S \log \vert x-y \vert \, dy, \qquad x\in S.$$ We have \begin{align*}
\vert I(x) \vert &\leqslant  \int_S \big\vert \log \vert x-y \vert \big\vert \, dy.
\end{align*} The Layer Cake representation implies that \begin{align*}
\int_S \big\vert \log \vert x-y \vert \big\vert \, dy &= \int_0^\infty A(t) \, dt
\end{align*} where $A(t)$ denotes the area of $\Omega_t:=\{y \in S\text{ s.t. } \big\vert \log \vert x-y \vert \big\vert  > t\}$. See if you can fill in the details of the following steps:

*

*We can write $\Omega_t=S \cap (B_{e^{-t}}(x)\cup B_{e^t}(x))$ where $B_r(x)= \{ y \in \mathbb R^2 \text{ s.t. } \vert y-x\vert<r\}$.


*Prove that there exists $C_0>0$, independent of $x$, such that $$ \int_0^\infty A(t)\, dt \leqslant C_0.$$ Consider the case $e^t> \max \{1,\mathrm{diam}\, S\}$ and $e^t\leqslant \max \{1,\mathrm{diam}\, S\}$ separately. (Here $\mathrm{diam}\, S := \sup_{x,y\in S} \{ \vert x-y \vert \}$ is the diameter of $S$). In each case bound $A(t)$ by an appropriate function of $t$ (that is independent of $x$).


*Prove that $$\bigg \vert \int_S \int_S \log \vert x- y \vert \,dx\,dy\bigg \vert \leqslant C_0\vert S \vert  $$ which is finite.
