Let $f$ be twice differentiable function on $\mathbb R$ such that $$f(tx+(1-t)y) \le tf(x)+(1-t)f(y)$$
for all $x,y \in \mathbb R$ and for all $t \in[0,1]$.Then show that $f''(x) \ge 0$ for all $x \in \mathbb R$.
I have tried to solve it but I fail. Would anyone please give me some suggestion about solving this problem.
EDIT $:$
I have solved it by the method of contradiction.Here's this $:$
If possible let $f''(c)<0$ for some $c \in \mathbb R$.Then $\exists$ a neighbourhood of $c$ say $(\alpha,\beta)$ such that for $\alpha<x<y<\beta$ we have $f'(x) > f'(y)$.
Now take $z=tx+(1-t)y$.Then clearly $x<z<y$.Therefore we have $:$
$$f(z)-f(x)=\int_{x}^{z} f'(t)\ dt>f'(z)(z-x).$$
and
$$f(y)-f(z)=\int_{z}^{y} f'(t)\ dt<f'(z)(y-z).$$
Hence we have $f(tx+(1-t)y)>tf(x)+(1-t)f(y)$ which contradicts the fact that $f$ is a convex function on $\mathbb R$.
Hence the result follows.
Is the above reasoning correct at all? Please verify it.
Thank you in advance.