TITLE: Piecewise convexity and global convexity
QUESTION [4 upvotes]: Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be continuous on $\left[0,1\right]$.
Consider $z\in\left(0,1\right)$ and suppose that $f$ is differentiable
and convex on $\left[0,z\right]$ and $\left[z,1\right]$. If $f'$
(i.e., $\frac{df}{dx}$) is continuous at $z$, then $f$ is convex
on $\left[0,1\right]$. - Is this proposition true? While I could not create a counter-example, I am finding it difficult to generate a clean proof as well.

REPLY [3 votes]: A differentiable function $f$ is convex on an interval $(a,b)$ if and only if its derivative $f'$ is increasing. 
Therefore, your assumptions imply that $f'$ is increasing on $(0,z)$ and on $(z,1)$. Now your assumption that $f'$ is continuous immediately gives you that $f'$ is increasing on $(0,1)$ and therefore convex.
{"set_name": "stack_exchange", "score": 4, "question_id": 3323197}