Let $f: R \to R$ be a continuous function that satisfies $\forall x \in R$ $$f(x) \leq \frac{f(x - h) + f(x + h)}{2}$$
$\forall h > 0$. Show that the maximum value of f on any bounded closed interval $[a,b]$ is attained at one of the endpoints. That is, either $f(a)$ or $f(b)$ is the maximum value of f on the interval [a,b].
I'm not actually convinced the maximum is at an endpoint. I'm honestly not sure how to analyze this function. Can anyone give me some insight here? Thank you!
Note: This is an an analysis class where we have not covered differentiation. So we cannot use that.
If the maximum is not attained at the endpoints, then it is attained at some $c \in (a,b)$, with $f(a) < f(c)$ and $f(b) < f(c)$. Assume without loss of generality that $c$ is no closer to $b$ than it is to $a$, and let $h = c-a$. Then $f(c-h) = f(a) < f(c)$, and since $b$ is no closer to $c$ than it is to $a$, we have $c+h \in [a,b]$, which implies that $f(c+h) \leq f(c)$. Putting these together,
$$f(c) \leq \frac{f(c-h)+f(c+h)}2 < \frac{f(c)+f(c)}2 = f(c),$$
a contradiction.