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?