Solving inequality for convex functions.

Here is an idea how you can prove it.

  1. Take a point $a\in I$ to the left of $c$ and a point $b\in I$ to the right, i.e. $a<c<b$, and draw two secant lines: $\ell_a$ through $(a,f(a))$ and $(c,f(c))$ and $\ell_b$ through $(c,f(c))$ and $(b,f(b))$. Denote $k_a$ and $k_b$ their slopes respectively.
  2. By convexity, the graph of $f$ is under $\ell_a$ on $[a,c]$ and above it outside $[a,c]$. Similarly, the graph of $f$ is under $\ell_b$ on $[c,b]$ and above it outside $[c,b]$. It gives, in particular, that $k_a\le k_b$.
  3. Let $a\to c^-$. The slope $k_a$ is monotonically increasing (again by convexity) and bounded from above by $k_b$, hence, converges to some value $M_1$. Similar argument when $b\to c^+$ gives that $k_b\to M_2$.
  4. Since $k_a\le k_b$ we get $M_1\le M_2$. Now any $m\in[M_1,M_2]$ works.
  5. If $f$ is differentiable at $c$ then $M_1=M_2$.

P.S. The interval $[M_1,M_2]$ is called subdifferential of $f$ at $c$.


In your argument, the point $y\in (x,c)$ you found by the mean value theorem depends on $x$, hence $m=f'(y)$ also does. However, the value of $m$ in the claim must be the same for all $x\in I$.


As smcc pointed out in their comment, we can think of $y=m(x-c)+f(c)$ as a line passing through the point $\left(c, f(c)\right)$ with slope $m$. Let's assume that this line has a second intersection with the curve $f(x)$: $\left(b, f(b)\right)$. Then, we can rewrite the equation of the line using the fact that $\displaystyle m=\frac{f(b)-f(c)}{b-c}$: $$y=\frac{f(b)-f(c)}{b-c}(x-c)+f(c)$$ We can use the substitution $\displaystyle t=\frac{x-c}{b-c}$ to get the following equation:

$$y=tf(b)+(1-t)f(c)$$

Now, we use the convex condition which was mentioned in the OP: $$f(tb+(1-t)c)\leq tf(b)+(1-t)f(c) \text{ for }t\in[0,1] $$

Unless $f(x)$ is the equation of a line, equality is only reached when $t=0$ or $t=1$. Ergo, for all $x$ between $b$ and $c$, $m(x-c)+f(c)>f(x)$. The only case in which this does not happen is when the line $y=m(x-c)+f(c)$ has no second intersection. In other words, $m=f'(c)$.

In the case that $f(x)$ is a line, the question should be easy to answer.