Suppose that the function $\displaystyle f$ is continuous on $\displaystyle [a,b)$ and the limit $\displaystyle L=\lim_{x\rightarrow{b^-}}{f(x)}$ exists.

(i) Prove that if there is an $\displaystyle x_0\in{[a,b)}$ such that $\displaystyle f(x_0)>L$, then $\displaystyle f$ has an absolute maximum in $\displaystyle [a,b)$.

How to approach this question?

(ii) If there is an $\displaystyle x_1\in{[a,b)}$ such that $\displaystyle f(x_1)=L$, does $\displaystyle f$ necessarily have an absolute maximum in $\displaystyle [a,b)$?