$f$ convex and concave, then $f=ax+b$ 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 

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)$$
