Problem
Let $f$ be continuous on (a,b). prove that $f$ is convex on (a,b) if and only if $f$ satisfies $ f( \frac{x+y}{2} ) \leq \frac{f(x)+f(y)}{2} $ for all $x,y \in (a,b) $
I thought that it is easy by using the definition of convex
a function f on (a,b) is said to be convex if $f(tx+(1-t)y)$ $ \leq $ $tf(x) + (1-t)f(y)$ for all $ x,y \in (a,b) $ and $ t \in [0,1] $
But my professor said that I was wrong. "you should use induction"
I didn't understand what he said, but he doesn't say anymore.
How can I prove this?