An inequality in positive real continuous function

I proposed my conjecture as follows:

Let $f(x)$ is a positive real continuous function that is convex on $[m, M]$, let $m \le x_i \le M$, for $i=1,2,...,n$ then show that $$\frac{f(x_1)+f(x_2)+.....+f(x_n)}{n} \le \frac{f(M)+ f(m)}{2f\left(\frac{M+m}{2}\right)} f\left(\frac{x_1+x_2+....x_n}{n}\right)$$

Equality holds if only if $m=x_1=x_2=....=x_n=M$

• What did you try? – Qwerty Jul 24 '16 at 17:25
• Try with Jensen's inequality – Martín Vacas Vignolo Jul 24 '16 at 17:28
• I tried, but I can not give my proof. I checked by my computer – Oai Thanh Đào Jul 24 '16 at 17:28
• I think you are missing a factor of $1/n$ on the LHS – kennytm Jul 24 '16 at 17:39
• Doesn't it also hold with equality if $f$ is linear? Or if half the $x_i$'s are $m$, the other half $M$? – smcc Jul 24 '16 at 18:01

You made a second conjecture in the comment to my first answer, so I am answering that here. The conjecture is:

Conjecture:

$$\frac{f(x_1)+...+f(x_n)}{n} - f(\frac{x_1+...+x_n}{n}) \leq \frac{f(M)+f(m)}{2}- f(\frac{M+m}{2})$$ whenever $f$ is continuous and convex over the interval $[m,M]$ and $m \leq x_i\leq M$ for all $i$.

Counter-example:

Consider $m=0,M=1$. Consider $f:[0,1]\rightarrow\mathbb{R}$ defined with 2 piecewise linear segments over the intervals $[0,3/4]$ and $[3/4,1]$ with: \begin{align} f(0) &= 2\\ f(3/4) &= 1\\ f(1) &= 2 \end{align} Specifically: $$f(x) = \left\{ \begin{array}{ll} -(4/3)x + 2 &\mbox{ if x \in [0, 3/4]} \\ 4x-2 & \mbox{ if x \in [3/4,1]} \end{array} \right.$$ Then: $$\frac{f(M)+f(m)}{2} - f(\frac{M+m}{2})= \frac{f(1)+f(0)}{2} - f(1/2) = 2/3$$

Now let $x_1=0, x_2=x_3=x_4=1$. So: $$\frac{f(x_1)+...+f(x_4)}{4} - f(\frac{x_1+...+x_4}{4}) = 2-f(3/4)=1$$

• Dear @Michael , but I think, in your proof f(x) is not convex, f(x) is linear – Oai Thanh Đào Jul 24 '16 at 19:09
• @OaiThanhĐào : What do you mean? $f$ has a "v" shape so is certainly not linear. It is almost like the absolute value function $|x|$ but with different slopes on each edge. – Michael Jul 24 '16 at 19:10
• Can you check with $f(x)=x^2$ ? – Oai Thanh Đào Jul 24 '16 at 19:12
• I mean: The conjucture 2 must be true with f''>0 and f'>0 @Michael – Oai Thanh Đào Jul 25 '16 at 0:51
• You can modify my example to use differentiable and increasing convex functions if you like. Try this: Fix $m=0, M=1$, let $g(x)$ be the function defined by the line segment between points $(0,0)$ and $(1,1)$, and draw a picture of a smooth, convex, increasing function $f(x)$ that lies below $g(x)$, meets $g(x)$ at the endpoints $x=0$ and $x=1$, and has a largest gap between $g(x)$ that does not occur at $x=1/2$. If the largest gap occurs at some point $x^* \in (0,1)$, $x^*\neq 1/2$, so that $g(x^*)-f(x^*) > g(1/2)-f(1/2)$, note you can always approximate $x^*$ by a rational number. – Michael Jul 25 '16 at 13:46

What if you fix $\epsilon>0$ and consider $f:[0,3]\rightarrow\mathbb{R}$ defined by $f(x) = (x-1)^2 + \epsilon$? So $m=0, M=3$. Let $x_1=0, x_2=2$. So:

\begin{align} \frac{f(x_1)+f(x_2)}{2} &= \frac{f(0)+f(2)}{2} = 1 + \epsilon\\ f(\frac{x_1+x_2}{2}) &= f(1) = \epsilon \\ \frac{f(M)+f(m)}{2} &= \frac{f(3)+f(0)}{2} = (5/2)+\epsilon\\ f(\frac{M+m}{2}) &= f(1.5) = (1/4)+\epsilon \end{align}

So for a counter-example to your conjecture, we just find an $\epsilon>0$ such that: $$1+\epsilon > \left(\frac{(5/2)+\epsilon}{(1/4)+\epsilon}\right)\epsilon$$ which is true for all sufficiently small $\epsilon>0$.

• Specifically, $0<\epsilon<1/5$. – kennytm Jul 24 '16 at 18:09
• Thank to You very much, the conjecture is wrong – Oai Thanh Đào Jul 24 '16 at 18:14
• @OaiThanhĐào: it may hold, however, if you assume something stronger on your $f$, namely that $f>0$ and $\log f$ is convex on $[m,M]$. – Jack D'Aurizio Jul 24 '16 at 18:19
• @Michael , I am sorry, it may hold if we edit again: $$\frac{f(x_1)+f(x_2)+.....+f(x_n)}{n}-f(\frac{x_1+x_2+....x_n}{n}) \le \frac{f(M)+ f(m)}{2}-f(\frac{M+m}{2})$$ – Oai Thanh Đào Jul 24 '16 at 18:21
• @JackD'Aurizio Thank to You very much – Oai Thanh Đào Jul 24 '16 at 18:24