Why is it true that $f(x) \leq \frac{x-a}{b-a}f(b) + \frac{b-x}{b-a}f(a)$? [closed]
Why is the following true for convex functions: By convexity of a function $f(x)$, for $x \in [a,b]$ we have $$ f(x) \leq \frac{x-a}{b-a}f(b) + \frac{b-x}{b-a}f(a) $$ ?
Solution 1:
A real-valued function $f$ is convex provided that for all $x, y$ and $\lambda \in [0, 1]$, $$ f(\lambda x + (1-\lambda) y) \leq \lambda f(x) + (1-\lambda) f(y). $$ To see your claim, note that if $\lambda = \tfrac{b-x}{b-a}$, then $\lambda \in [0, 1]$ (since $a \leq x \leq b$), and we also have $$ \lambda a +(1-\lambda) b = \frac{a(b-x)}{b-a} + \frac{b(x-a)}{b-a} = x. $$ Therefore, $$ f(x) = f(\lambda a +(1-\lambda) b) \leq \lambda f(a) + (1-\lambda) f(b)x = \frac{b-x}{b-a} f(a) + \frac{x-a}{b-a} f(b). $$ This is perhaps more clear written as follows: $$ f(x) = f(a + \tfrac{x - a}{b-a}(b - a)) \leq f(a) + \tfrac{x-a}{b-a}\Big(f(b) - f(a)\Big). $$ This gives the spirit of convexity: the function on the line segment $a$ to $b$ lies below the chord between $f(a)$ and $f(b)$.