Prove that $\sum_{1\le iLet $n \ge 2$ be a an integer and $x_1,...,x_n$ are positive reals such that $$\sum_{i=1}^nx_i=\frac{1}{2}$$
Prove that
$$\sum_{1\le i<j\le n}\frac{x_ix_j}{(1-x_i)(1-x_j)}\le \frac{n(n-1)}{2(2n-1)^2}$$
Here is the source of the problem (in french) here
Edit:
I'll present my best bound yet on $$\sum_{1\le i<j\le 1}\frac{x_ix_j}{(1-x_i)(1-x_j)}=\frac{1}{2}\left(\sum_{k=1}^n\frac{x_k}{1-x_k}\right)^2-\frac{1}{2}\sum_{k=1}^n\frac{x_k^2}{(1-x_k)^2}$$
This formula was derived in @GCab's Answer.
First let $a_k=x_k/(1-x_k)$
so we want to prove
$$\left(\sum_{k=1}^na_k\right)^2-\sum_{k=1}^na_k^2\le \frac{n(n-1)}{(2n-1)^2}$$
But since $$\frac{x_k}{1-x_k}<2x_k\implies \sum_{k=1}^na_k<1 \quad (1)$$
Hence $$\left(\sum_{k=1}^na_k\right)^2\le \sum_{k=1}^na_k$$
Meaning $$\left(\sum_{k=1}^na_k\right)^2-\sum_{k=1}^na_k^2\le\sum_{k=1}^na_k(1-a_k)$$
Now consider the following function $$f(x)=\frac{x}{1-x}\left(1-\frac{x}{1-x}\right)$$
$f$ is concave on $(0,1)$ and by the tangent line trick we have $$f(x)\le f'(a)(x-a)+f(a)$$
set $a=1/2n$ to get $$a_k(1-a_k)\le\frac{4n^2\left(2n-3\right)}{\left(2n-1\right)^3}\left(x_k-\frac{1}{2n}\right)+ \frac{2(n-1)}{(2n-1)^2}$$
Now we sum to finish $$\sum_{k=1}^na_k(1-a_k)\le \frac{2n(n-1)}{(2n-1)^2}$$
Maybe by tweaking $(1)$ a little bit we can get rid of this factor of $2$

You should be able to look for the maximum, by the method of Lagrange. We set
$$F(x_1,...,x_n) \equiv \sum_{i\neq j} \frac{x_i x_j}{(1-x_i)(1-x_j)} \stackrel{\text{wts.}}{\leq} \frac{n(n-1)}{(2n-1)^2} \, ,$$
and define the Lagrange-function as $$L(x_1,...,x_n) = F(x_1,...,x_n) - \lambda \left(x_1+...+x_n-1/2\right) \,.$$
At an extremum we have $$\nabla L = 0 \qquad , \qquad \nabla=\begin{pmatrix} \partial_{x_1} \\ \vdots \\ \partial_{x_n} \\ \partial_\lambda\end{pmatrix} \, ,$$
in coordinates
\begin{align}\frac{2}{(1-x_k)^2} \sum_{\substack{i=1 \\ i\neq k}}^n \frac{x_i}{1-x_i} &= \lambda \quad\text{for}\quad k=1,...,n  \tag{1} \\ 
\sum_{i=1}^n x_i &= 1/2 \tag{2} \, .\end{align}
Multiplying Equation (1) by $\frac{(1-x_k)^2}{2}$ and adding $\frac{x_k}{1-x_k}$ to both sides gives
$$c=\sum_{i=1}^n \frac{x_i}{1-x_i} = \frac{\lambda}{2} (1-x_k)^2 + \frac{x_k}{1-x_k} \tag{3}$$
where the sum on the LHS is now independent on $k$ and we can consider it as a constant $c$. We now sum (3) from $k=1$ to $n$
\begin{align}
nc&=\frac{\lambda}{2} \left( n - 1 + \sum_{k=1}^n x_k^2\right) + c \\
\Rightarrow \quad c&= \frac{\lambda}{2} + \frac{\lambda}{2(n-1)} \sum_{k=1}^n x_k^2 > \frac{\lambda}{2} \tag{4}
\end{align}
which we will need to use in a second. Rearranging Equation (3) gives a monic polynomial in $x_k$
$$x_k^3 - 3x_k^2 + \left( 3 - \frac{2+2c}{\lambda} \right)x_k + \frac{2c}{\lambda} - 1 = 0 \, . \tag{5}$$
A cubic can have either only 1 real solution, in which case there is nothing to show, since then $x_1=...=x_n$ follows, or it can have 3 real solutions. In this case there appears to be a great variety of combinations of the three roots for the various $x_k$. However, since the product of the three roots is equal to $1-\frac{2c}{\lambda}<0$ by Equation (4) and (5), either all three roots are negative (discard), or only one root is negative and we are left with two choices for the various $x_k$. But then, since the sum of all three roots is equal to $3$ by Equation (5) and one root is negative, the sum of the two positive roots must be strictly greater than $3$. This implies, that at least one of them is strictly greater than $1/2$, which stands in contradiction to Equation (2). Thus, we are left with only one valid real solution satisfying Equation (2) and $$x_1=...=x_n=x$$
follows. It is then easy to see that $x=1/2n$.
It remains to show, that this extremal point is actually a maximum. The hessian of $L$ is given in coordinates by
$$\frac{1}{2} \, {\rm Hess}_{k,l} (L) = \frac{2\delta_{k,l}}{(1-x_k)^3} \sum_{i\neq k} \frac{x_i}{1-x_i} + \frac{1-\delta_{k,l}}{(1-x_k)^2(1-x_l)^2} \qquad \text{for} \qquad k,l=1,...,n \\
\frac{1}{2} \, {\rm Hess}_{n+1,k} (L) = \frac{1}{2} \, {\rm Hess}_{k,n+1} (L) = -1 \qquad \text{for} \qquad k=1,...,n \\
\frac{1}{2} \, {\rm Hess}_{n+1,n+1} (L) = 0 \, .$$
With $x_k=x=1/2n$ the first line becomes
$$\frac{1}{2} \, {\rm Hess}_{k,l} (L) = \frac{1-\frac{\delta_{k,l}}{n}}{\left(1-\frac{1}{2n}\right)^4} \qquad \text{for} \qquad k,l=1,...,n$$
and in matrix-form this looks like
$$\frac{1}{2} \, {\rm Hess} (L) = \frac{1}{\left(1-\frac{1}{2n}\right)^4} \begin{pmatrix} 
1-1/n & 1 & \dots & 1 & -1 \\
1 & 1-1/n & \dots & 1 & -1 \\
\vdots & \vdots & \ddots & \vdots & \vdots \\
1 & 1 & \dots & 1-1/n & -1 \\
-1 & -1 & \dots & -1 & 0  \end{pmatrix} \, .$$
Then, defining the variational vector $\epsilon=(\epsilon_1,...,\epsilon_n,\epsilon_\lambda)^t$, we find for the second variation
$$\frac{1}{2} \sum_{k,l=1}^{n+1} \epsilon_k \, {\rm Hess}_{k,l} (L) \, \epsilon_l = - \frac{\sum_{k=1}^n \epsilon_k^2/n}{\left(1-\frac{1}{2n}\right)^4}<0$$ $\forall \epsilon \in {\mathbb R}^{n+1}$ satisfying
$$\sum_{k=1}^n \epsilon_k = 0 \, ,$$
which is a consequence of Equation (2).
