# Show that: $nf(\frac{x_1+\cdots+x_n}{n})+n\left(\frac{f(M)+f(m)}{2}-f(\frac{M+m}{2})\right) \ge f(x_1)+\cdots+f(x_n)$

I am looking for a proof of the problem as following:

Let $f(x)$ is a real continuous function that is strictly convex ($f''>0$) on $[m, M]$, let $m \le x_i \le M$, for $i=1,2,\ldots,n$ then show that:

$$nf\left(\frac{x_1+\cdots+x_n}{n}\right)+n\left(\frac{f(M)+f(m)}{2}-f\left(\frac{M+m}{2}\right)\right) \ge f(x_1)+\cdots+f(x_n)$$

Equality holds if only if $m=x_1=x_2=\cdots=x_n=M$

• Equality holds if [and] only if ... The only if part can't be true. Equality trivially holds for a constant function no matter what $m, M, x_i$ for example. – dxiv Aug 19 '16 at 3:05
• @dxiv The function that is convex, so the function is not a constant function – Oai Thanh Đào Aug 19 '16 at 3:24
• A constant function is convex (and concave, for that matter). I guess what you have in mind is a strictly convex function, see the definitions at mathworld or wikipedia for example. If you do mean a strictly convex function then you should edit the question and spell it out. – dxiv Aug 19 '16 at 3:29
• Your edit f'' > 0 introduces the assumption that the function would have a 2nd order derivative, which is a far stronger assumption than the original one of continuity. Why not simply call it for what it is - a *strictly* convex function - and leave derivatives out of the picture. – dxiv Aug 19 '16 at 3:40

The inequality does not hold in general. For a simple counterexample, consider the convex function:

$$f(x) = \begin{cases} 0 & \text{if x \lt \frac{2}{3}} \\ x - \frac{2}{3} & \text{if x \ge \frac{2}{3}} \end{cases}$$

and $m=0, M=1, n=3, x_1=0, x_2=x_3=1$.

Since $f(0)=f(\frac{1}{2})=f(\frac{2}{3})=0, f(1)=\frac{1}{3}$ the inequality becomes:

$$3 f(\frac{2}{3}) + 3(\frac{f(0)+f(1)}{2} - f(\frac{1}{2})) \ge f(0) + 2 f(1)$$ $$\frac{1}{2} \ge \frac{2}{3}$$ where the latter is obviously false.

For a counterexample using a strictly convex function, one can choose $f(x) = e^x$, $m = 0 \le M$, $n=3$, $x_1=0, x_2=x_3=M$. The inequality becomes:

$$3 e^{\frac{2}{3}M} + 3(\frac{1+e^M}{2} - e^\frac{M}{2}) \ge 1 + 2 e^M$$

$$- \frac{1}{2} e^M + 3 e^{\frac{2}{3}M} - 3 e^\frac{M}{2} + \frac{1}{2} \ge 0$$

The latter will fail for large enough $M$ since the dominant term $e^M$ has a negative coefficient.

• Dear Mister @dxiv, Thank to You, see here mathoverflow.net/questions/247930/… – Oai Thanh Đào Aug 22 '16 at 4:02
• @OaiThanhĐào Thank you for the followup. The new formulation posted at MO looks right, indeed. – dxiv Aug 22 '16 at 4:31