<s>[INST] 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 .$
 [/INST] 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$.
</s>