TITLE: Is there a set $A \subset [0,1]$ such that $\int_{A \times A^\text{c}} \frac{\mathrm{d} x \, \mathrm{d} y}{\lvert x - y\vert}=\infty$?
QUESTION [22 upvotes]: The above question came up when I was trying to find a counterexample related to this problem. Clearly, the integral of $(x,y) \mapsto \lvert x-y \rvert^{-1}$ over $[0,1]^2$ is divergent. When integrating over a subset of the form $A \times A^\text{c}$ with Lebesgue measurable $A \subset [0,1]$ (and $A^\text{c} = [0,1] \setminus A$), however, the result is generally finite. I would like to know whether this is true for every $A$.
My thoughts so far:

For the simple interval $A = [0,1/2]$ the integral has the finite value $\log(2)$. The integrand is only singular near the point $(1/2,1/2)$, which is not enough to make the two-dimensional integral diverge. The same is true if $A$ is a union of finitely many intervals. Therefore, in order to make the integral large we need 'a lot' of points $(x,y) \in A \times A^\text{c}$ for which $\lvert x - y \rvert$ is small.
This can be achieved by choosing $A = [0,1] \cap \mathbb{Q}$, but of course the integral is simply zero  in this case because $A \times A^\text{c}$ is a Lebesgue null set. Thus we also need to ensure that both $A$ and $A^\text{c}$ have positive measure.
We can let $A$ be the fat Cantor set to fulfil both requirements: $A$ and $A^\text{c}$ have Lebesgue measure $\frac{1}{2}$ each and there is an infinite number of points on the diagonal of $[0,1]^2$ near which the integrand diverges. I have tried to show that the integral is finite/infinite using the sequence of simpler sets defined in the iterative construction of $A$, but the corresponding integrals become complicated rather fast and it seems like I am stuck at this point.

Question:

Can we prove that $\int \limits_{A \times A^\text{c}} \frac{\mathrm{d} x \, \mathrm{d} y}{\lvert x - y\vert} < \infty$ holds for every Lebesgue measurable $A \subset [0,1]$ or find a counterexample?

REPLY [0 votes]: An alternative counterexample based on my initial misinterpretation of Empy2's answer:
Let $w_m = \frac{1}{m \log^2(m)}$ for $m \in \mathbb{N} \setminus \{1\}$ and $a_n = \sum_{m=2}^n w_m$ for $n \in \mathbb{N} \cup \{\infty\}$ . Define
$$ A = \bigcup \limits_{k=1}^\infty \left[\frac{a_{2k-1}}{a_\infty}, \frac{a_{2k}}{a_\infty}\right) ,$$
so that
$$ A^\text{c} = [0,1] \setminus A =  \{1\} \cup \bigcup \limits_{l=1}^\infty \left[\frac{a_{2l}}{a_\infty}, \frac{a_{2l+1}}{a_\infty}\right) . $$
Then
\begin{align}
\int \limits_{A \times A^\text{c}} \frac{\mathrm{d} x \, \mathrm{d} y}{\lvert x - y\vert} &= \sum \limits_{k,l = 1}^\infty ~ \int \limits_{\frac{a_{2k-1}}{a_\infty}}^{\frac{a_{2k}}{a_\infty}} \int \limits_{\frac{a_{2l}}{a_\infty}}^{\frac{a_{2l+1}}{a_\infty}} \frac{\mathrm{d} y \, \mathrm{d} x}{\lvert x - y\vert} \stackrel{(u,v) = a_\infty (x,y)}{=} \frac{1}{a_\infty} \sum \limits_{k,l = 1}^\infty ~ \int \limits_{a_{2k-1}}^{a_{2k}} \int \limits_{a_{2l}}^{a_{2l+1}} \frac{\mathrm{d} v \, \mathrm{d} u}{\lvert u - v\vert} \\
&= \frac{1}{a_\infty} \sum \limits_{k = 1}^\infty \left[\sum \limits_{l=1}^{k-1} ~ \int \limits_{a_{2k-1}}^{a_{2k}} \int \limits_{a_{2l}}^{a_{2l+1}} \frac{\mathrm{d} v \, \mathrm{d} u}{u - v} + \sum \limits_{l=k}^\infty ~ \int \limits_{a_{2k-1}}^{a_{2k}} \int \limits_{a_{2l}}^{a_{2l+1}} \frac{\mathrm{d} v \, \mathrm{d} u}{v-u} \right] \\
&\geq \frac{1}{a_\infty} \sum \limits_{k = 1}^\infty \left[\sum \limits_{l=1}^{k-1} \frac{(a_{2k} - a_{2k-1})(a_{2l+1} - a_{2l})}{a_{2k} - a_{2l}} + \sum \limits_{l=k}^\infty \frac{(a_{2k} - a_{2k-1})(a_{2l+1} - a_{2l})}{a_{2l+1} - a_{2k-1}} \right] \\
&\geq \frac{1}{a_\infty} \sum \limits_{k = 1}^\infty \left[\sum \limits_{l=1}^{k-1} \frac{w_{2k} w_{2l+1}}{2(k-l) w_{2l+1}} + \sum \limits_{l=k}^\infty \frac{w_{2k} w_{2l+1}}{2(l-k+1) w_{2k}} \right] \\
&= \frac{1}{2 a_\infty} \left[\sum \limits_{k = 1}^\infty w_{2k} \sum \limits_{l=1}^{k-1} \frac{1}{k-l} + \sum \limits_{l=1}^\infty w_{2l+1} \sum \limits_{k=1}^l \frac{1}{l-k+1} \right] \\
&= \frac{1}{2 a_\infty} \left[\sum \limits_{k = 1}^\infty w_{2k} H_{k-1} + \sum \limits_{l=1}^\infty w_{2l+1} H_l \right] = \frac{1}{2 a_\infty} \sum \limits_{n=2}^\infty \frac{H_{\left \lfloor (n-1)/2 \right \rfloor}}{n \log^2(n)} = \infty \, ,
\end{align}
since the harmonic numbers satisfy $H_{\left \lfloor (n-1)/2 \right \rfloor} \sim \log(n)$ as $n \to \infty$ .
{"set_name": "stack_exchange", "score": 22, "question_id": 3627512}