# Inequality with condition $\sum\limits_{1\leq i,j\leq n}|1-x_ix_j|=\sum\limits_{1\leq i,j\leq n}|x_i-x_j|$

Let $$x_1,x_2,\ldots,x_n\, (n\geq 3)$$ be positive real numbers such that $$\sum_{1\leq i,j\leq n}|1-x_ix_j|=\sum_{1\leq i,j\leq n}|x_i-x_j|.$$ Prove that: for arbitrary real number $$a_1,a_2,\ldots,a_n$$, there is a real number $$t$$, such that $$\sum_{i=1}^n |\sin (t-a_i)|\leq \cot \left(\frac\pi{2\sum_{i=1}^n x_i}\right).$$

I think $$\sum_{1\leq i,j\leq n}|1-x_ix_j|=\sum_{1\leq i,j\leq n}|x_i-x_j|$$ is difficult to use, because it seems so surprising.

• Note: Piquito's counterexample is not true, because from the condition, we have $\sum_{i=1}^n x_i = n$. Aug 23, 2022 at 2:18

This edition gives a second and better counterexample.

As you say, the given condition on the $x_1,x_2,x_3,\cdots,x_n$ is difficult to use.

I'm afraid what you're proposing is not true. Here a counterexample for $n=3$. Because of the difficulty mentioned above the calculations are approximate but the continuity makes them very plausible.

Take $(x_1,x_2,x_3)\approx(0.1,\space 1.432,\space 0.02)$. You have with these values $$(|x_1-x_2|+|x_1-x_3|+|x_2-x_3|)-(|1-x_1x_2|+|1-x_1x_3|+|1-x_2x_3|)\approx 0.01$$ In other words $RHS-LHS\approx 0.01$ and with $x_1,x_2,x_3$ having better decimal approximation would have the equality.

Now one has $$2(x_1+x_2+x_3)\approx 3.104\\\cot\left(\dfrac{\pi}{3.104}\right)\approx 0.6251195670$$ and taking the arbitraries $(a_1,a_2,a_3)=\left(\dfrac{\pi}{2},\dfrac{\pi}{5},\dfrac{\pi}{5}\right)$ one has the function $$g(x)=|\sin(x-\dfrac{\pi}{2})|+2|\sin(x-\dfrac{\pi}{5})|\ge 0.831$$ For which, whatever $x$ ($t$ in your notation) we would have the absurdity $$0.831\le 0.625$$

A better second counterexample: $(x_1,x_2,x_3)=(0.3,\space0.07,\space 1.3157)$.

Now you have $$LHS-RHS=0.000791$$ and $\cot\left(\dfrac{\pi}{3.3714}\right)\approx 0.7429287$ which with the same $g(x)$ above gives the absurde $$0.831\le0.7429$$

►This counterexample is better than the first one because $LHS$ is closer to $RHS$◄

Proof.

From the condition $$\sum_{1\leq i,j\leq n}|1-x_ix_j|=\sum_{1\leq i,j\leq n}|x_i-x_j|$$, we have $$\sum_{i=1}^n x_i = n.$$ Proof: It is example 15 in page 443, “Problems from the book” (2008) by Titu Andreescu and Gabriel Dospinescu. Also, see the proof by Ravi B@AoPS, by applying USAMO 2000 Problem 6.

Thus, we need to prove that, for arbitrary real numbers $$a_1, a_2, \cdots, a_n$$, there is a real number $$t$$ such that $$\sum_{i=1}^n |\sin (t - a_i)| \le \cot \frac{\pi}{2n}.$$

WLOG, assume that $$0\le a_1 \le a_2 \le \cdots \le a_n \le \pi$$.
(Note: $$|\sin (t - a_i)| = |\sin (t - a_i + k\pi)|$$ for all $$k \in \mathbb{Z}$$.)

We use @cats's very nice idea (@Martin R told me this link).

Let $$a_{n + k} = \pi + a_k$$, $$k = 1, 2, \cdots, n-1$$. We have \begin{align*} 2\sum_{1\le i < j \le n} \sin (a_j - a_i) &= \sum_{j=1}^{n-1} \sum_{i=1}^n \sin(a_{i+j} - a_i)\\ &\le \sum_{j=1}^{n-1} n \sin \frac{\sum\limits_{i=1}^n (a_{i+j} - a_i)}{n} \tag{1}\\ &= \sum_{j=1}^{n-1} n \sin \frac{\pi j}{n}\\ &= \frac{n}{2\sin \frac{\pi}{2n}} \sum_{j=1}^{n-1} 2\sin \frac{\pi}{2n} \sin \frac{\pi j}{n} \\ &= \frac{n}{2\sin \frac{\pi}{2n}} \sum_{j=1}^{n-1} \left(\cos\frac{(2j-1)\pi}{2n} - \cos\frac{(2j+1)\pi}{2n}\right)\\ &= \frac{n}{2\sin \frac{\pi}{2n}}\left(\cos\frac{\pi}{2n} - \cos\frac{(2(n-1)+1)\pi}{2n}\right)\\ &= n\cot \frac{\pi}{2n}. \tag{2} \end{align*} Explanation: (1) $$x\mapsto \sin x$$ is concave on $$[0, \pi]$$. And $$a_{i+j} - a_i \in [0, \pi]$$ for all $$i=1, 2, \cdots, n$$ and $$j=1, 2, \cdots, n-1$$. Apply Jensen's inequality.

Let $$f(t) = \sum_{i=1}^n |\sin (t - a_i)|.$$ Using (2), we have $$\sum_{i=1}^n f(a_i) = 2 \sum_{1\le i < j \le n} \sin (a_j - a_i) \le n \cot \frac{\pi}{2n}.$$ Thus, by the Pigeonhole Principle, there exists $$k$$ such that $$f(a_k) \le \cot \frac{\pi}{2n}$$.

We are done.