Prove that for $a_i\in\mathbb R$, $$\sum_{i=1}^n\sum_{j=1}^{n} \frac{a_ia_j}{|i-j|+1}\geq 0$$
The first step I did was to write the above as $$\int_0^1\sum_{i=1}^n\sum_{j=1}^{n}a_ia_jt^{|i-j|}dt$$ Had the $|i-j|$ been $i+j$, the problem would have been done because we can complete the square. The problem is that modulus. Another thing that's came to my mind was to let $p(t)=\sum a_it^i$ then the thing inside the integral is almost $p(t)p(1/t)$ but the negative powers of $t$ are also present... Maybe we should try substituting $u=1/t$? But that brings with it a $1/u^2$ and the limits also change. Maybe some clever identity can help but I cannot find any good one. This problem is given as an unsolved exercise in PFTB where the trick of interchanging between $|\bullet-\bullet|$ and $\min(\bullet,\bullet)$ is frequently used but the modulus is in the exponent so even that does not look promising....
I want any solution using integrals please because the problem is given in that section