TITLE: An olympiad-like inequality
QUESTION [6 upvotes]: I found this problem in my old paper :

Let $f(x)$ be a convex function on $(0,\infty)$ such that $\forall x>0$ we have $f(x)>0$ and $n\geq 3$ a natural number then we have :
  $$\Big(f(1)^{f(1)}f(2)^{f(2)}\cdots f(n)^{f(n)}\Big)^{\frac{1}{f(1)+f(2)+\cdots + f(n)}}+\Big(f(1)f(2)\cdots f(n)\Big)^{\frac{1}{n}}\leq f(1)+f(n) $$

I try to use Jensen's inequality we have :
$$\ln\Big( \Big(f(1)^{f(1)}f(2)^{f(2)}\cdots f(n)^{f(n)}\Big)^{\frac{1}{f(1)+f(2)+\cdots + f(n)}} \Big)\leq \ln\Big(\frac{f^2(1)+f^2(2)+\cdots+f^2(n)}{f(1)+f(2)+\cdots+f(n)}\Big)$$
Remains to show this :
$$\ln\Big(\frac{f^2(1)+f^2(2)+\cdots+f^2(n)}{f(1)+f(2)+\cdots+f(n)}\Big)\leq \ln\Big(f(1)+f(n)-\Big(f(1)f(2)\cdots f(n)\Big)^{\frac{1}{n}}\Big)$$
This last inequality is true for $f(x)=e^x$ but certainly not for $f(x)=x$
Furthermore this result recall me the Mercer's inequality (see here)
Finally If the function $f(x)$ is concave and positive the inequality of the beginning is reversed .
I think it's too hard for an maths competition but you can use the tools you want .
I prefer hints as answer.
Thanks a lot for sharing your time and knowledge .
Edit :
Ooops I don't mentionned that the case $n=2$ is special it correspond to this
New bound for Am-Gm of 2 variables
Second edit :
I disturbed me a little bit but I think we can add the following constraint.
I add the fact that $\ln(f(x))$ must be concave on $(0,\infty)$.If it's doesn't work too can someone prove the inequality for $f(x)=x\alpha$ where $\alpha>0$ ?
Thanks again !

REPLY [2 votes]: Hint: Normalize both sides by $\sum_i f(i)$ and take a look at case $n=3$: 

Red axis corresponds to $\frac{f_2}{\sum_i f_i}$, green axis to $\frac{f_1}{\sum_i f_i}$, point $N = (\frac{1}{n},...,\frac{1}{n})$ corresponds to $f_1=f_2=...=f_n$, all points to the left of $N$ - to the convex sequences $\{f_i\}$, the curved surface corresponds to the normalized left hand side, hyperplane - to the normalized right hand side. 
Rigorous proof will involve a study of the geometry of the surface given by the image of the set $\{w \in \mathbb{R}^n : \sum_i w_i = 1\}$ (simplex) under the map $w \to \prod_i w_i^{w_i} + \prod_i w_i^\frac{1}{n}$.
Detailed argument: (to be finished)

Slight change of notation: 

\begin{equation}
    f_i := f(i) \quad w_i := \frac{f_i}{\sum_i f_i}.
\end{equation}
Our inequality becomes
\begin{equation}
\prod_i f_i ^{w_i} + \prod_i f_i^\frac{1}{n} \leq f_1 + f_n.
\end{equation}

Divide both sides of inequality by $\sum_i f_i$:

\begin{equation}
 \prod_i w_i^{w_i} + \prod_i w_i^\frac{1}{n} \leq w_1 + w_n.
\end{equation}
One can recognize entropy probability ($\exp(-H(w))$ where $H(w)$ is the entropy of distribution $w$) and geometric mean in the functions on the left side.
\begin{equation}
    E(w) := \prod_i w_i^{w_i} \quad  G(w) := \prod_i w_i^\frac{1}{n}.
\end{equation}

Left hand side has a critical point $\bar w = (\frac{1}{n},...,\frac{1}{n})$. 
Study of Hessian evaluated at this $\bar w$.
Study the behavior of $L(\lambda; w^*) = E(\lambda \bar w + (1-\lambda) w^*)+G(\lambda \bar w + (1-\lambda) w^*)$ depending on $w^*$.
...some more math gymnastics...
Q.E.D.!