Proof that $\sum\limits_{j,k=1}^N\frac{a_ja_k}{j+k}\ge0$

I found this inequality holds:

Given a sequence of real numbers,
$a_1,a_2,…,a_N$, if
$$S=\sum_{j,k=1}^N\frac{a_ja_k}{j+k}$$ then $$S\ge0$$

Is it a known result? How is it possible to prove it?

Solutions Collecting From Web of "Proof that $\sum\limits_{j,k=1}^N\frac{a_ja_k}{j+k}\ge0$"

It strongly reminds me of the Hilbert matrix, although slightly different. And here is a simple and brutal proof:

$$ S
= \sum_{j,k=1}^{N} a_j a_k \int_{0}^{1} x^{j+k-1} \, dx
= \int_{0}^{1} \bigg( \sum_{j=1}^{N} a_j x^{j-1} \bigg)^2 x \, dx
\geq 0 $$

It is also interesting to notice that the equality holds if and only if $a_1 = \cdots = a_N = 0$.

Define matrix $B$ such that $b_{ij}=1/(b_i^2+b_j^2)$. We want to prove that $B$ is positive semi-definite matrix.

By the application of Sylvester’s criterion, the condition is equivalent to all principal minors of $B$ having nonnegative determinant. By mathematical induction, it is enough to prove that $B$ has nonnegative determinant.

Note that $B$ is Cauchy matrix where $x_i=b_i^2,y_i=-b_i^2$. The determinant of $B$ is given as$$\frac{\prod_{1\le i<j\le n}(x_j-x_i)(y_i-y_j)}{\prod_{1\le i,j\le n}(x_i-y_j)}=\frac{\prod_{1\le i<j\le n}(b_j^2-b_i^2)^2}{\prod_{1\le i,j\le n}(b_i^2+b_j^2)}$$and this is obviously nonnegative.

In fact, no two real numbers $a_j,a_k$ will produce a negative result regardless of the numbers, so when it’s broadened to $N$ numbers it won’t be negative since it’s just the sum of multiple sets of 2-variable solutions. $$\frac{a_j^2}{2j}+\frac{a_ja_k}{j+k}+\frac{a_k^2}{2k}$$ The above is the expanded version of a 2-variable solution. This function will never be negative as long as $j,k$ are positive; it’s irrelevant how large or small they are.