Let $f$ be a twice differential function defined on open interval $(a,b) \subseteq R$. Let $[c,d] \subseteq (a,b)$. I am able to prove that if $f''(x) \geq 0$ on $[c, d]$ then $f$ is necessarily convex on it(defined via Jensen's inequality). Here's my proof:
Now assume that $f''$ is nonnegative on $(a,b)$ such that the inequality does not hold for some pair $(p,q)$ and $t \in [0,1]$. Let $r=(1-t)p+tq$, then $$ f(r) > \frac{r-q}{p-q} f(p) + \frac{p-r}{p-q} f(q)$$ or equivalently $$ \frac{f(r) - f(p)}{r-p} > \frac{f(q) - f(r)}{q-r}$$ by mean value theorem $$\exists u_1 < u_2: f'(u_1) > f'(u_2)$$ but $f''(x) \geq 0$ on $(a,b)$ implies nondecreasing, which is contradictive.
But as for the converse, I've only managed to prove it using the $C^2$ assumption(i.e. twice continuously differentiable):
Assume the convexity holds but $f''$ is negative at some point $x_0$, then $f''$ must be negative on some $(x_0 - \delta, x_0 + \delta)$ (by continuity of $f''$: this is necessary) and thus $f'$ is strictly decreasing on it. We have the inequality (by mean value theorem) $$ f'(x_0 - \delta) > \frac{f(x_0)-f(x_0 - \delta)}{\delta} > f'(x) > \frac{f(x_0+\delta)-f(x_0)}{\delta} > f'(x_0+\delta) $$ and hence $$ f(x_0) > \frac{f(x_0 - \delta) + f(x_0 + \delta)}{2}$$ leading to a contradiction.
Question: Is $C^2$ necessary for the converse statement? I found several MSE posts, but they all either used the $C^2$ assumption or other results where $C^2$ is necessary.
Hint for avoiding continuity of $f''$: Let $x<y$. Use convexity to show that $\frac {f(x+h)-f(x)} h \leq \frac {f(y+h)-f(y)} h$ whenever $0< h<y-x$. Leting $h \to 0$ we get $f'(x) \leq f'(y)$. Thus, $f'$ is increasing which implies $f''(x) \geq 0$.