Problem: Find the least constant $C$ such that for any integer $n > 1$ the inequality
\[\sum_{1 \le i < j \le n} x_i x_j (x_i^2 + x_j^2)
  \le C \left( \sum_{1 \le i \le n} x_i \right)^4\]
holds for all real numbers $x_1, \dots, x_n \ge 0$.
Determine the cases of equality.

Solution: Answer: $C = \frac 18$, with equality when two $x_i$ are equal
and the remaining $x_i$ are equal to zero.

We present two proofs of the bound.

\paragraph{First solution by smoothing.}
Fix $\sum x_i = 1$.
The sum on the left-hand side can be interpreted as
$\sum_{i=1}^n x_i^3 \sum_{j \neq i} x_j = \sum_{i=1}^n x_i^3(1-x_i)$,
so we may rewrite the inequality as:
Then it becomes \[ \sum_i (x_i^3 - x_i^4) \le C. \]

\begin{claim*}
  [Smoothing]
  Let $f(x) = x^3 - x^4$.
  If $u + v \le \frac 34$, then $f(u) + f(v) \le f(0) + f(u+v)$.
\end{claim*}
\begin{proof}
  Note that
  \begin{align*}
    (u^3-u^4)+(v^3-v^4) &\le (u+v)^3-(u+v)^4 \\
    \iff uv(4u^2+4v^2+6uv) &\le 3uv(u+v)
  \end{align*}
  If $u+v\le \frac 34$ this is obvious as $4u^2+4v^2+6uv \le 4(u+v)^2$.
\end{proof}

Observe that if three nonnegative reals have pairwise sums
exceeding $\frac34$ then they have sum at least $\frac 98$.
Hence we can smooth until $n-2$ of the terms are zero.
Hence it follows
\[ C = \max_{a+b=1} (a^3+b^3-a^4-b^4) \]
which is routine computation giving $C = \frac18$.

\paragraph{Second solution by AM-GM (Nairit Sarkar).}
Write
\begin{align*}
  \text{LHS}
  &\le \left( \sum_{1 \le k \le n} x_k^2 \right)
  \left( \sum_{1 \le i < j \le n} x_i x_j \right)
  = \half \left( \sum_{1 \le k \le n} x_k^2 \right)
  \left( \sum_{1 \le i < j \le n} 2 x_i x_j \right) \\
  &\le \half \left( \frac{\sum_k x_k^2 + 2 \sum_{i<j} x_i x_j}{2}  \right)^2
  = \frac 18 \left( \sum_{1 \le i < n} x_i \right)^4
\end{align*}
as desired.