The above question came up when I was trying to find a counterexample related to [this](https://math.stackexchange.com/questions/3222681/when-is-int-01-int-01-fracfx-fyx-y-textd-x-textd-y) 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](https://en.wikipedia.org/wiki/Smith%E2%80%93Volterra%E2%80%93Cantor_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?
> 
> 
>