Ex4-7

Chapter 4, Question 7 
Question: Let f be usc and less than +\inftyon a compact set E. Show that f is bounded above on E. Show also that fassumes its maximum on E, that is, that there exists x_0\in E such that f(x_0)\geq f(x) for all x\in E. 
Proof: Assume the contrary that f is unbounded above. Then there is a sequence \{x_n\} in E such that \{f(x_n)\}is strictly increasing and 
\lim_{n\to\infty} f(x_n)=+\infty. 
Since a compact set is sequentially compact, we can choose a convergent subsequence \{x_{n_k}\} which converges to x\in E.By definition, one has 
f(x)\geq \limsup_{u\in E; u\to x}f(u)\geq \lim_{k\to\infty}f(x_{n_k})=+\infty,
the last inequality is valid because x_{n_k}\to x. This means f(x)=+\infty, contradicts the assumption that f<+\infty on E.
Now let M=\sup_{x\in E}f(x) , we prove the supremum is attainable. For each n\in\mathbb N we choose x_n\in E such that f(x_n)>M-1/n. There is a convergent subsequence \{x_{n_k}\} of E which converges to x\in E. Therefore, we have
M\geq f(x)\geq \limsup_{u\to x; u\in E}f(u)\geq \lim_{k\to\infty} f(x_{n_k})\geq M.
Therefore, we have f(x)=M.