Convex integral inequality I cannot prove that if $f(x)$ is convex on $[a,b]$ then
$f\Big(\frac{a+b}2\Big) \le \frac1{b-a}\int_a^b f(x)\,dx \le \frac{f(a)+f(b)}2 .$
 A: The inequality
$$ f\Big(\frac{a+b}{2}\Big)\leq \frac{1}{b-a}\int_a^bf(x)\;dx $$
is a special case of Jensen's inequality.
And since $f$ is convex, we have
$$ f(x)\leq f(a)+\frac{f(b)-f(a)}{b-a}(x-a) $$
for $a\leq x\leq b$, hence
$$\int_a^bf(x)\;dx\leq (b-a)f(a)+\frac{f(b)-f(a)}{b-a}\cdot\frac{(b-a)^2}{2}=(b-a)\frac{f(a)+f(b)}{2}$$
which is equivalent to the second inequality.
A: For convenience, we can take $b=1,a=-1$.  
For the first inequality, use
$$f(0) \le \dfrac{f(x) + f(-x)}{2}$$
and integrate both sides from $x=-1$ to $1$.
For the second, use
$$ f(x) = f\left( \dfrac{1-x}{2} (-1) + \dfrac{1+x}{2}(1)\right) \le
\dfrac{1-x}{2} f(-1) + \dfrac{1+x}{2} f(1) $$
and integrate both sides from $x=-1$ to $1$.
A: Since $f$ is convex on $[a,b]$, one has: $$\forall x\in[a,b],f(x)\leqslant\frac{f(b)-f(a)}{b-a}(x-a)+f(a).$$
Therefore, one gets: $$\int_a^bf(x)\;\mathrm{d}x\leqslant\frac{f(b)-f(a)}{b-a}\frac{(b-a)^2}{2}+f(a)(b-a).$$
Finally, one has: $$\frac{1}{b-a}\int_a^bf(x)\;\mathrm{d}x\leqslant\frac{f(b)+f(a)}{2}.$$
A: It is the Hermite-Hadamard inequalities :
The mesure $\nu$ defined by $d\nu=\frac{dx}{b-a}$ is a mesure of total mass $1$, its barycenter is $\frac{1}{b-a}\int_a^bxdx=\frac{a+b}{2}$, so the first inequality comes from Jensen inequality.
For the second one use the substitution $t=a+x(b-a)$. $\frac1{b-a}\int_a^b f(x)\,dx=\int_0^1 f((1-t)a+tb)dt\le\int_0^1(1-t)f(a)+tf(b)dt=\frac{f(a)+f(b)}2 $
