0

a) Does the following function convex in $[0,1]$?

$f(x)= \begin{cases} & x^{2} \text{ if }x\in [0,1)\\ & 2\text{ if } x=1 \end{cases}$

b) Prove that if g is a convex function in $[0,1]$ then g is continuous in $(0,1)$

My answer for the first problem is that yes, since $x^{2}$ is a convex function in the interal $[0,∞]$, it should be convex in $[0,1]$

Could you give me a hint on how to prove the second assertion?

1 Answers1

1

Your first answer is incorrect because you didn't address the fact that $f(1)=2$. If it were the case that $f(1)=-2$, then the function would be non-convex. You've proven that $f$ is convex on $[0,1)$. To prove that it is convex on $[0,1]$ you need to also show that there is no line with endpoint $(1,2)$ that violates the definition of convexity. This follows straightforwardly from the fact that $2>1=1^2$ and the fact that $f(x)=x^2$ is convex.

For the second part of this question, see here.