Find the max real number $\lambda$ s.t. $(\sum_{i=1}^nx_i)^2 \ge \lambda \sum_{1\le i\lt j\le n}x_ix_j$ for $\forall x_i,x_j \in R$.
The inequality is written as $$\left(\sum_{i=1}^n x_i\right)^2\ge \lambda \frac{\left(\sum_{i=1}^n x_i\right)^2 - \sum_{i=1}^n x_i^2}{2}$$ or $$\lambda \sum_{i=1}^n x_i^2 \ge (\lambda - 2) \left(\sum_{i=1}^n x_i\right)^2.$$
Letting $x_1 = x_2 = \cdots = x_n = 1$, we have $\lambda n \ge (\lambda - 2)n^2$ or $\lambda \le \frac{2n}{n - 1}$.
We claim that the maximum of $\lambda$ is $\frac{2n}{n - 1}$. It suffices to prove that $$\frac{2n}{n - 1} \sum_{i=1}^n x_i^2 \ge \left(\frac{2n}{n - 1} - 2\right) \left(\sum_{i=1}^n x_i\right)^2$$ or $$n \sum_{i=1}^n x_i^2 \ge \left(\sum_{i=1}^n x_i\right)^2$$ which is clearly true.