# Piecewise convexity and global convexity

by Tapas   Last Updated August 14, 2019 15:20 PM

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.

Tags :

#### Answers 3

A differentiable function is convex in an interval $$I$$ if and only if $$f'$$ is increasing in $$I$$. Now we have that $$f'(x)\leq f'(z)\leq f'(y)$$ for any $$0\leq x. Can you take it from here?

Yes it's true. $$f$$ is convex iff $$f'$$ is monotonically non-decreasing, but it works on $$[0, z)$$ and $$(z, 1]$$. But $$f'$$ is continuous at $$z$$ so it can't be less than 0 otherwise there would be a neighborhood where it is negative and thus not convex.

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.