# Function that is both midpoint convex and concave

Which functions $f:\mathbb{R} \to \mathbb{R}$ do satisfy $$f\left(\frac{x+y}{2}\right) = \frac{f(x)+f(y)}{2}$$ for all $x,y \in \mathbb{R}$

I think the only ones are of type $f(x) = c$ for some constant $c\in \mathbb{R}$ and the solutions of the Cauchy functional equation $f(x+y) = f(x)+f(y)$ and the sums and constant multiples of these functions. Are there other functions which are both midpoint convex and concave?

Without loss, translate so that $f(0) = 0$. Then we have

$$f(x) = f\left(\frac{2x + 0}{2}\right) = \frac{f(2x)}{2}$$

so that $f(2x) = 2 f(x)$.

Now suppose that $f$ is midpoint convex and concave. We show it satisfies the Cauchy equation:

$$f(x + y) = f\left(\frac{2x + 2y}{2}\right) = \frac{f(2x) + f(2y)}{2} = f(x) + f(y)$$ as claimed. Now just remember that multiples of solutions to the Cauchy equation are still solutions to the Cauchy equation - hence, functions with your property are exactly translates of functions which solve the Cauchy equation.

• "functions with your property are exactly functions which solve the Cauchy equation" - That is false: $f(x) = 1$ is a solution to the equation above but not a solution of Cauchy equation. Have I missed something? – Andrei Kh Jul 5 '16 at 19:46
• @AndreiKh Yes, you're quite right. That's a translate of the zero function which does solve the Cauchy equation. – user296602 Jul 5 '16 at 19:52
• Ah - I didn't see "translates of functions". Thanks! – Andrei Kh Jul 5 '16 at 20:33
• @AndreiKh Actually, what I had written was wrong until your correction - thanks. – user296602 Jul 5 '16 at 20:36
• Nice answer. I will add for other users that more on Cauchy functional equation can be found in this post: Overview of basic facts about Cauchy functional equation. – Martin Sleziak Aug 8 '17 at 5:56