TITLE: Prove that $f$ is a convex function if $f(x) \leq \int \limits_0^1 f(x + \alpha \cos(2 \pi y))dy $
QUESTION [7 upvotes]: Let $f$ be a continuous $\mathbb{R}$-valued function defined on $\mathbb{R}$ such that
$$f(x) \leq \int \limits_0^1 f(x + \alpha \cos(2 \pi y))dy~~~~\forall x,\alpha \in \mathbb{R}$$
Prove that $f$ is a convex function.
My attempt:

$\sum \limits_{k=1}^n \cos\left( \frac{2 \pi k}{n} \right) =0$, so $f(x) =
f \left(\sum \limits_{k=1}^n \left(x +\alpha \cos\left( \frac{2 \pi k}{n} \right)\right)\frac{1}{n} \right) $
$\int \limits_0^1 f(x + \alpha \cos(2 \pi y))dy = \sum \limits_{k=1}^n
\frac{1}{n} f\left(x + \alpha \cos\left( \frac{2 \pi k}{n} \right) \right) + o(1)$
And now the inequality in the condition is similar to Jensen's inequality,
but it is not a definition of a convex function.

Also, $\int \limits_0^1 \cos(2 \pi y) dy = 0$, so my question is a variation of this.

REPLY [3 votes]: First note that
$$
 L(x) = \int_0^1 L(x+\alpha \cos(2\pi t)) \, dt
$$
holds for all linear functions $L$.
Now fix $a < b$ and let $L$ be the linear function satisfying $L(a)=f(a)$ and $L(b) = f(b)$. We have to show that
$f(x) \le L(x)$ for $a \le x \le b$.
Assume on the contrary that
$$
 M = \max \{ f(x) - L(x) \mid a \le x \le b \} > 0 \, .
$$
The idea is to show that if the maximum is attained at some point in $(a, b)$ then it is in fact attained in a neighborhood of that point. That will lead to partition of $[a, b]$ into disjoint, non-empty, and relative open subsets, which is not possible.
So let $c \in (a, b)$  be a point where the maximum is attained. Choose $\alpha > 0$ such that $[c-\alpha, c+\alpha] \subset (a, b)$. Then
$$
 M = f(c) - L(c) \le \int_0^1 (f-L)(c + \alpha \cos(2 \pi t) \, dt 
\le \int_0^1 M \, dt = M \, .
$$
Since $f-L$ is continuous, this implies that $f(x)-L(x) = M$ for all $x \in  [c-\alpha, c+\alpha]$.
It follows that the sets
$$
 A = \{ x \in [a, b] \mid f(x) - L(x) < M \} \\
 B = \{ x \in [a, b] \mid f(x) - L(x) = M \} 
$$
are

both relative open in $[a, b]$,
both non-empty: $a, b \in A$ and $c \in B$,
disjoint,
and their union is the interval $[a, b]$.

This is a contradiction to the fact that intervals are connected.
So $M > 0$ is not possible, and therefore $f(x) \le L(x)$ for all $x \in [a, b]$.