Let $f:(a,b)\rightarrow \mathbb{R}$ be a continuous function. Suppose $\exists k\in (0,1)$ such that $\forall x,y\in (a,b), f(kx+(1-k)y)≦kf(x)+(1-k)f(y)$.
Let $A=\{\lambda\in [0,1]|\forall x,y\in (a,b) , f(\lambda x + (1-\lambda)y)≦\lambda f(x) + (1-\lambda)f(y)\}$.
Then $A$ is dense in $[0,1]$.
I have proved that $f$ is convex when $k$ is a rational, but what if $k$ is irrational? (in ZF)
I constructed a sequence in $A$ which is convergent to some fixed $p$ in $(0,1)$ when $k\in \mathbb{Q}$, but there must be a better proof using the definition of $\epsilon-\delta$.
I was so foolish that i couldn't think of this argument.
Fix $p\in (0,1)$ and $x,y \in (a,b)$.
Suppose $f(px+(1-p)y)>p f(x) + (1-p) f(y)$.
Let $\alpha = f(px+(1-p)y) - [p f(x) + (1-p) f(y)]$.
Then, there exists $\delta_1$ such thay $d(p,z)<\delta_1 \Rightarrow d(pf(x) + (1-p)f(y), zf(x)+(1-z)f(y))<\frac{\alpha}{2}$.
Also, there exists $\delta_2$ such that $d(p,z)<\delta_2 \Rightarrow d(f(px+(1-p)y),f(zx+(1-z)y))<\frac{\alpha}{2}$.
Let $\delta = \min \{\delta_1,\delta_2\}$.
Since $A$ is dense, $B(p,\delta)\cap A ≠ \emptyset$.
So, there exists $z\in A$ such that $f(zx+(1-z)y>zf(x) + (1-z)f(y)$. This leads a contradiction.