Find $I$ if $\int_0^1 \max\{f(a), f(x)\}dx\ge \max_{x \in I} f(x)$ Let $a\in [0,1]$. FInd all the closed intervals $I \subset [0,1]$ such that the following inequality holds for any convex differentiable function $f:[0,1]\to \mathbb{R}$ :
$$\int_0^1 \max\{f(a), f(x)\}dx\ge \max_{x \in I} f(x)$$
What I did was setting $I=[u, v]$ and plugging in $f(x)=x$ and $f(x)=-x$ which gave me in turn that $a^2+1\ge 2v$ and $2a-a^2\le 2u$. Then I got stuck. I also thought about using the fact that a convex function attains its maximum at the endpoints of a closed interval, but I wasn't successful
 A: I guess that the missing part to your argument is to recognize that the two linear functions $L(x) = -x$ and $R(x) = x$ represent the worst cases for the inequalities you are trying to prove.
First note that the inequality is invariant for linear transformation of the image of $f$ in the form $f \mapsto \alpha f + \beta$ where $\alpha, \beta \in \mathbb{R}$ with $\alpha > 0 $.
Define the interval $I_a$ as follows
$$
I_a = [u_a, v_a] \dot= \left[ a-\frac{a^2}{2}, \frac{a^2+1}{2} \right]
$$
(it is straightforward to check that $I_a$ is always not empty).
Let $f$ be any convex differentiable function on $[0,1]$ (for the argument that follows, this assumption might be relaxed, requiring only a bound on the "slope" of $f$ at $x=0,1$). Being convex, the function $f$ can reach its maximum over $I_A$ either at $u_a$ or at $v_a$. In what follows we will assume that
$$
\max_{x \in I_a} f(x) = f(v_a).
$$
(the argument in the over case is very similar).
Up to a linear transformation of $f$ in the form above, we can further assume $f(v_a) = R(v_a) = v_a$ and, by convexity that 
$$
f(x) \geq R(x) \qquad \forall x \in [0,1]
$$
holds.
Finally, we deduce
$$
\int_0^1 \max \{ f(a), f(x) \} \, \mathrm{d}x \geq \int_0^1 \max \{ R(a), R(x) \} \, \mathrm{d}x \geq \max_{x \in I_a} R(x) = \max_{x \in I_a} f(x).
$$
