# $f$ convex and concave, then $f=ax+b$ [duplicate]

Let $f$ be a real function defined on some interval $I$.

Assuming that $f$ both convex and concave on $I$, i.e, for any $x,y\in I$ one has $$f(\lambda x+(1-\lambda)y)=\lambda f(x)+(1-\lambda)f(y),\, \, \lambda\in (0,1) .$$
I would like to show that $f$ is of the form $f=ax+b$ for some $a,b$.

I was able to prove it when $f$ is differentiable, using the relation $$f'(x)=f'(y).$$

Anyway, I was not able to provide a general proof (without assuming that $f$ is differentiable, and without assuming that $0\in I$).

Any answer will be will be appreciated.

Edit: It is little bit different from tte other question How to prove convex+concave=affine?. Here $f$ is defined on some interval, so $o$ not necessary in the domain. Please remove the duplicate message if this possible

• @Batman no, it is little bit different. Here $f$ is defined on some interval, so $o$ not necessary in the domain. Please remove the duplicate message if this possible. – user231725 Apr 15 '15 at 19:54
• It doesn't make a difference if $0$ is in the domain or not -- you can shift to make that true. – Batman Apr 15 '15 at 20:02
• @Batman can you show me how there is no difference. Thanks – user231725 Apr 15 '15 at 20:04
• Batman's right. – Mathemagician1234 Apr 15 '15 at 20:19
• @Mathemagician1234 can you explain? Thanks – user231725 Apr 15 '15 at 20:24

Consider a fixed point $c \in I$. We have $$\dfrac{f(c+\lambda(x-c))-f(c)}{\lambda(x-c)} = \dfrac{\lambda(f(x)-f(c))}{\lambda(x-c)}$$ Hence, $$f'(c)=\lim_{\lambda \to 0}\dfrac{f(c+\lambda(x-c))-f(c)}{\lambda(x-c)} = \lim_{\lambda \to 0} \dfrac{\lambda(f(x)-f(c))}{\lambda(x-c)} = \dfrac{f(x)-f(c)}{x-c}$$ Hence, for all $x \in I$, we have $$f(x) = f(c) + (x-c)f'(c)$$
• Are you assuming that $f$ is differentiable? thanks. – user231725 Apr 15 '15 at 20:30
• @JohnJohn No. We infact prove that $f$ is differentiable, if $f(\lambda x+(1-\lambda )y) = \lambda f(x)+(1-\lambda)f(y)$ – Adhvaitha Apr 15 '15 at 20:31