Let $S=\{y: y \ge 0\text{ and }f(y)\le x\}$. Show that if $S$ is a convex set then $f$ is a convex function.
Let $\alpha\in (0,1)$ and $y_1,y_2 \in S$. Then, $y_1,y_2 \ge 0$ and $f(y_1)\le x,f(y_2)\le x$. Since $S$ is convex, $\alpha y_1+(1-\alpha)y_2 \in S$.
I want to show that $f(\alpha y_1+(1-\alpha)y_2)\le \alpha f(y_1)+(1-\alpha)f(y_2)$. But I'm unable to figure out this inequality.
Any help?
I think your hypothesis should be $S=\{(x,y): y \geq 0, f(y) \leq x\}$ is convex. Note that $(f(y_1),y_1)$ and $(f(y_2),y_2)$ both belong to $S$. Hence $$\alpha (f(y_1),y_1)+(1-\alpha) (f(y_2),y_2)$$ $$=(\alpha f(y_1) +(1-\alpha) f(y_2), \alpha y_1 +(1-\alpha) y_2)$$ is in $S$. By definition of $S$ this means $f(\alpha y_1 +(1-\alpha) y_2) \leq \alpha f(y_1)+(1-\alpha) f(y_2)$.