Let f be a continous function in [a,b] and

$\displaystyle

g(x) = \left\{ \begin{gathered}

f(a)\,\,\,x = a \hfill \\

\max \left\{ {f(x):\,x \in \left[ {a,x} \right]} \right\}\,\,\,x \in (a,b] \hfill \\

\end{gathered} \right.

$

prove that g is continous in [a,b]