TITLE: If $\int_{\mathbb R^2} \frac{\vert f(x)-f(y)\vert}{\vert x-y\vert^2}dxdy<+\infty$ then $f$ is a.e. constant
QUESTION [22 upvotes]: Let $f \in L^1(\mathbb R)$. If 
  $$
\int_\mathbb R \int_\mathbb R \frac{\vert f(x)-f(y)\vert}{\vert x-y\vert^2}dxdy<+\infty
$$
  then $f$ is a.e. constant.

I do not know how to begin. I thought that we are set if we show that the integrand is bounded a.e. (the function $f$ would be 2-holderian, hence constant)  but this is not true in general. I mean $\phi \in L^1(\mathbb R)$ does not imply $\phi \in L^{\infty}(\mathbb R)$. 
Would you please give me some useful hints in order to start? 
Thanks.

REPLY [21 votes]: One cheap way to do it is as follows. Let $I$ be the given integral. Notice that if $I(h)=\iint_{|x-y|< h}\frac{|f(x)-f(y)|}{|x-y|^2}\,dxdy$, then
$$
\iint_{|x-y|<h}\frac{|f(x)-f(\frac{x+y}2)|}{|x-y|^2}\,dxdy=
\frac 14\iint_{|x-y|<h}\frac{|f(x)-f(\frac{x+y}2)|}{|x-\frac{x+y}2|^2}\,dxdy
\\
=
\frac 12\iint_{|x-z|<h/2}\frac{|f(x)-f(z)|}{|x-z|^2}\,dxdz=\frac 12I(h/2)\,,
$$ 
and the same identity holds for $\iint_{|x-y|<h}\frac{|f(\frac{x+y}2)-f(y)|}{|x-y|^2}\,dxdy$. (I hope that Tonelli and linear change of variable $z=\frac{x+y}2$ in one-dimensional Lebesgue integral with respect to $y$ are among available tools).
Thus, by the triangle inequality $I(h)\le I(h/2)$. From here we can finish in 10 different ways. For instance, we can conclude that $\iint_{h/2\le|x-y|<h}\frac{|f(x)-f(y)|}{|x-y|^2}\,dxdy=0$, whence, summing over $h=2^k$, $k\in\mathbb Z$, we get $I=0$. Now it means (by Tonelli again) that for almost all $y$ we have $f(x)=f(y)$ for almost all $x$, which is pretty much the end of the story.
The point, of course, is that the original integral scales in a nice way, which is always something to watch for.