Why is $\int\int f(x)f(y) |x-y|dxdy$ negative?

Solution 1:

You don't need smoothness: indeed, integrability is probably enough. Perhaps the "most illuminating" proof is to use Fourier series: let $f \in L^2[-R,R]$, then $$ \tilde{f}(k) = \frac{1}{2R}\int_{-R}^R e^{i\pi kx/R}f(x) \, dx $$ all exist, and Parseval's identity says that $$ C\sum_{k=-\infty}^{\infty} \overline{\tilde{f}(k)} \tilde{g}(k) = \int_{-R}^R \overline{f(x)}g(x) \, dx, $$ where $C$ is an uninteresting normalisation constant (most likely $2R$).

Also, we have the convolution theorem, so taking $g=f \star h $, where $h(x)=-\lvert x \rvert$, we find that $$ \tilde{g}(k) = \tilde{f}(k) \tilde{h}(k), $$ and a calculation shows that $$ \tilde{h}(k) = \begin{cases} -R/2 & k=0 \\ \frac{(1-(-1)^k) R}{k^2 \pi^2} & k \neq 0 \end{cases}, $$ and in particular, all of these but $\tilde{h}(0)$ are nonnegative. Also, $\tilde{f}(0)=\int f = 0$. So therefore we have $$ -\iint f(x) f(y) \lvert x -y \rvert \, dx \, dy = 2R \sum_{k=-\infty}^{\infty} \lvert \tilde{f}(k) \rvert^2 \tilde{h}(k) = 2R\sum_{k \neq 0} \frac{(1-(-1)^k)R}{k^2\pi^2} \lvert \tilde{f}(k) \rvert^2 \geq 0 $$


More generally, it is apparent that if $g(x,y)=h(x-y)$, you require that all the Fourier coefficients of $h$ be nonnegative save for $k=0$. Beyond that, it's considerably more difficult (and in fact I am writing a paper that includes some such functions at the moment).

You can also generalise this to infinite intervals, if you have $\int \lvert x\rvert f(x) \, dx < \infty$, by a similar argument using the Fourier transform.

Solution 2:

Setting $F(x)=\int_{-R}^xf(y)\mathrm dy=H\star f(x)$ and $G(x)=\int_{-R}^xyf(y)\mathrm dy$, we have $F'(x)=f(x)$, $G'(x)=xf(x)$, $F(-R)=F(R)=0$. Proceed with integration $$\begin{split}A&=\iint f(x)f(y)|x-y|\,\mathrm dy\\ &=\int_{-R}^Rf(x)\left[x\int_{-R}^xf(y)\mathrm dy-\int_{-R}^xyf(y)\mathrm dy-x\int_x^Rf(y)\mathrm dy+\int_x^Ryf(y)\mathrm dy\right]\,\mathrm dx\\ &=\int_{-R}^Rf(x)\left(xF(x)-G(x)+xF(x)+G(R)-G(x)\right)\mathrm dx\\ &=\big[F(x)\left(2xF(x)-2G(x)+G(R)\right)\big]_{-R}^R-\int_{-R}^RF(x)\left(2xf(x)+2F(x)-2xf(x)\right)\mathrm dx\\ &=-2\int_{-R}^RF(x)^2\mathrm dx\le0. \end{split}$$

We have use integration by parts and $\int_x^Rf(y)\mathrm dy=F(R)-\int_{-R}^xf(y)\mathrm dy=-F(x)$.