Assume that $\phi$ is continuous real function on $(a,b)$ such that $$\phi\Big(\frac{x+y}{2}\Big)\le \frac{1}{2}\phi (x) +\frac{1}{2} \phi (y)$$ for all $x,y \in (a,b)$. Prove that $\phi$ is convex.
We need to show that for $\lambda \in [0,1]$ we have $\phi(\lambda x+ (1-\lambda)y) \le \lambda \cdot\phi(x)+(1-\lambda)\cdot \phi (y) \quad\forall x,y \in (a,b)$. I had drawn some figures and it was coming out to be convex, for rigorous proof I was thinking of proving this for rationals $x,y$ then using continuity argument we can prove it for all $x,y$ but I'm not able to do so.