How to prove the inequality $(1+a+a^2)(1+b+b^2)(1+c+c^2) \leq (1+a+b^2)(1+b+c^2)(1+c+a^2)?$ For  $a,b,c>0$ prove the inequality
$$
(1+a+a^2)(1+b+b^2)(1+c+c^2) \leq (1+a+b^2)(1+b+c^2)(1+c+a^2).
$$
Seems the  rearrangement inequality must help but I can't  do it. Any ideas?
 A: Hint:  You can use Karamata's inequality and the concavity of $\log$ function, with the fact that $(1+a+a^2, 1+b+b^2, 1+c+c^2) \succ (1+a+b^2, 1+b+c^2, 1+c+a^2)$ to conclude that:
$$\sum_{cyc} \log(1+a+a^2) \le \sum_{cyc} \log(1+a+b^2)$$
P.S: The same approach provides a simple proof for the more general statement Darij made in his post.
A: Yes, this is about the rearrangement inequality, but not literally. You need the following analogue of it:
Multiplicative rearrangement inequality. Let $a_1, a_2, \ldots, a_n$ and $b_1, b_2, \ldots, b_n$ be $2n$ nonnegative reals. Let $\sigma$ be a permutation of $\left\{1, 2, \ldots, n\right\}$ such that no $i$ and $j$ satisfy $a_i > a_j$ and $b_{\sigma\left(i\right)} < b_{\sigma\left(j\right)}$. (In this case, we say that the $n$-tuples $\left(a_1, a_2, \ldots, a_n\right)$ and $\left(b_{\sigma\left(1\right)}, b_{\sigma\left(2\right)}, \ldots, b_{\sigma\left(n\right)}\right)$ are weakly equi-ordered.) Then,
$\prod\limits_{i=1}^n \left(a_i + b_i\right) \geq \prod\limits_{i=1}^n \left(a_i + b_{\sigma\left(i\right)}\right)$.
To get your inequality from this, assume WLOG that set $a_1 = 1+a$, $a_2 = 1+b$, $a_3 = 1+c$, $b_1 = b^2$, $b_2 = c^2$, $b_3 = a^2$ and $\sigma = \left(3,1,2\right)$ (in one-line notation).
How to prove the multiplicative rearrangement inequality? I remember doing it on AoPS long ago, but I cannot find the post and I don't recall it being particularly readable, so let me give a few hints:
1. Prove that there is a permutation $\tau \in S_n$ such that $a_{\tau\left(1\right)} \leq a_{\tau\left(2\right)} \leq \cdots \leq a_{\tau\left(n\right)}$ and $b_{\sigma\left(\tau\left(1\right)\right)} \leq b_{\sigma\left(\tau\left(2\right)\right)} \leq \cdots \leq b_{\sigma\left(\tau\left(n\right)\right)}$. This is pure combinatorics, and rather simple: First find $\tau$ such that $a_{\tau\left(1\right)} \leq a_{\tau\left(2\right)} \leq \cdots \leq a_{\tau\left(n\right)}$ holds. Then, you have $b_{\sigma\left(\tau\left(i\right)\right)} \leq b_{\sigma\left(\tau\left(j\right)\right)}$ for every $i < j$ satisfying $a_{\tau\left(i\right)} < a_{\tau\left(j\right)}$ (because of the "weakly equi-ordered" condition), but you might occasionally have opposite inequalities for $i < j$ satisfying $a_{\tau\left(i\right)} = a_{\tau\left(j\right)}$. Fix these opposite inequalities by sorting the corresponding values of $\tau$ in the "right order".
2. Fix such a $\tau$. By continuity, assume that you have strict inequalities $a_{\tau\left(1\right)} < a_{\tau\left(2\right)} < \cdots < a_{\tau\left(n\right)}$ and $b_{\sigma\left(\tau\left(1\right)\right)} < b_{\sigma\left(\tau\left(2\right)\right)} < \cdots < b_{\sigma\left(\tau\left(n\right)\right)}$.
3. Apply Theorem 3 in Law Ka Ho, Variations and Generalisations
to the Rearrangement Inequality, Mathematical Excalibur 19/3 to $\left(a_{\tau\left(1\right)}, a_{\tau\left(2\right)}, \ldots, a_{\tau\left(n\right)}\right)$ and $\left(b_{\sigma\left(\tau\left(1\right)\right)}, b_{\sigma\left(\tau\left(2\right)\right)}, \ldots, b_{\sigma\left(\tau\left(n\right)\right)}\right)$ and $\tau^{-1} \circ \sigma \circ \tau$ instead of $\left(a_1, a_2, \ldots, a_n\right)$ and $\left(b_1, b_2, \ldots, b_n\right)$ and $\sigma$. Notice that Step 2 was necessary, because the proof given in that paper is incomplete: It only works when $a_1 < a_2 < \ldots < a_n$.
If you have a less patchwork proof, please share!
EDIT: The proof of Theorem 1 in my post http://www.artofproblemsolving.com/community/c6h288335p1798111 can be repurposed (essentially by replacing sums by products and vice versa) to a proof of Step 3 that avoids the use of Step 2.
