# Prove that and find all solutions $(x_1, x_2, x_3,..., x_n, n)$

Given $$x_1, x_2, x_3,..., x_n$$ is a positive real number that satisfies $$x_1+x_2+x_3+...+x_n=1$$ for natural number $$n\ge2$$. Prove that $$\frac{n}{8}\ge \sum_{{1}\le{i}<{j}\le{n}} {x_i}{x_j}\ge \sum_{i=1}^n 2{({x_i}^2-x_i)^2}$$ Also find all solutions $$(x_1, x_2, x_3,..., x_n, n)$$ that satisfy $$\frac{n}{8}= \sum_{{1}\le{i}<{j}\le{n}} {x_i}{x_j}= \sum_{i=1}^n 2{({x_i}^2-x_i)^2}$$

My work:

I tried using Cauchy-Schwarz to get $$\left(x_1^2+x_2^2+\cdots+x_n^2\right)\left(x_2^2+x_3^2+\cdots+x_n^2+x_1^2\right)\geq(x_1 x_2 + x_2 x_3 + \dots + x_{n - 1} x_n + x_n x_1)^2,$$ but I don't think this helps, and I'm not sure how to proceed.

We remark that $$\left(\sum_{i=1}^nx_i\right)^2 =\sum_{i=1}^nx_i^2+ 2\sum_{{1}\le{i}<{j}\le{n}} {x_i}{x_j}$$ then $$\sum_{{1}\le{i}<{j}\le{n}} {x_i}{x_j}= \frac{1}{2}-\frac{1}{2}\sum_{i=1}^nx_i^2$$

For the left inequality, we have $$\sum_{{1}\le{i}<{j}\le{n}} {x_i}{x_j} =\frac{1}{2}-\frac{1}{2}\sum_{i=1}^nx_i^2\le \frac{1}{2}- \frac{(\sum_{i=1}^nx_i)^2}{2n}=\frac{2n-1}{2n}$$ and $$\frac{2n-1}{2n} \le\frac{n}{2} \Longleftrightarrow (n-2)^2 \qquad \text{which is true}$$ The equality occurs if and only if $$n = 2$$ and $$x_1=x_2 = \frac{1}{2}$$

For the right inequality, it is equivalent to \begin{align} &\Longleftrightarrow \frac{1}{2} \le \frac{1}{2}\sum_{i=1}^nx_i^2+\sum_{i=1}^n(x_i^2-x_i)^2 \\ &\Longleftrightarrow \sum_{i=1}^n \left(4x_i^4 -8x_i^3+5x_i^2 \right) \le 1 \tag{1}\\ \end{align}

As for all $$i\in \{1,...,n\}$$, we have $$(2x_i-1)^2x_i(x_i-1) \le 0$$, then $$4x_i^4 -8x_i^3+5x_i^2 \le x_i$$ Make the sum, we deduce that $$(1)$$ holds true as $$\sum_{i=1}^n \left(4x_i^4 -8x_i^3+5x_i^2 \right) \le \sum_{i=1}^n x_i =1$$ The equality occurs if and only if $$(2x_i-1)^2x_i(x_i-1) = 0$$ for all $$i\in \{1,...,n\}$$ or $$x_i \in \left\{0,\frac{1}{2},1 \right\}$$. Given the fact that $$\sum_{i=1}^n x_i = 1$$ and $$x_i \ge 0$$, then the equality occurs if and only if one among 2 conditions below occurs

1. One of $$x_i$$ is equal to $$1$$ (for example, $$x_1 = 1$$), the other $$(n-1)$$ variables are equal to $$0$$ (for example, $$x_2 =...=x_n = 0$$)
2. Or two of $$x_i$$ are equal to $$\frac{1}{2}$$ (for example, $$x_1 = x_2 = \frac{1}{2}$$), the other $$(n-2)$$ variables are equal to $$0$$ (for example, $$x_3 =...=x_n = 0$$)

The left inequality. $$\sum_{1\leq i gives $$(n-1)\sum_{i=1}^nx_i^2-2\sum_{1\leq i or $$(n-1)\left(\sum_{i=1}^nx_i^2+2\sum_{1\leq i and from here $$\sum_{1\leq i because the last inequality it's $$(n-2)^2\geq0.$$

The right inequality.

We need to prove that: $$\frac{1-\sum\limits_{i=1}^nx_i^2}{2}\geq\sum_{i=1}^n(2x_i^4-4x_i^3+2x_i^2)$$ or $$\sum_{i=1}^n(4x_i^4-8x_i^3+5x_i^2)\leq1$$ or $$\sum_{i=1}^n(4x_i^4-8x_i^3+5x_i^2-x_i)\leq0$$ or $$\sum_{i=1}^nx_i(x_i-1)(2x_i-1)^2\leq0$$ and we are done.