Let $f$ be differentiable and convex on $(a,b)$. Prove that $f(y) \geq f(x) + f'(x)(y-x)$ for all $x, y \in (a, b)$ by using the definition of the derivative.
I proved as follows: $$ f'(x) = \lim_{y \to x} \frac{f(y)-f(x)}{y-x}.$$ If $y> x$, $$f'(x) \leq \frac{f(y)-f(x)}{y-x}.$$ So, $f(y) \geq f'(x)(y-x) + f(x)$.
But, my professor said I was wrong. Can someone explain to me where I am wrong?
We have that for $f$ differentiable
and thus by MVT for $c\in(x,y)$
$$\frac{f(y)-f(x)}{y-x}=f'(c)\ge f'(x) \implies f(y)\ge f(x)+ f'(x)(y-x)$$