# Lower semi-continuous function which is unbounded on compact set.

Every lower semi-continuous functions attains an infimum/minimum on a compact set, do you know examples of lower semi-continuous functions which are unbounded and/or don't attain their maximum/supremum?

-
Um, if the function is unbounded it can't attain it's supremum unless you allow the function to take the value infinity. Is that what you're looking for? – Patrick Da Silva Oct 19 '12 at 17:27
maybe in the first line you mean infimum/minimum instead of infimum/maximum? – Hans Oct 19 '12 at 17:36
We seem to have a new sport here: Synchronous answering. Not bad to have three answers posted within half a minute, 16 minutes after the question was posted. – Harald Hanche-Olsen Oct 19 '12 at 17:43
@HaraldHanche-Olsen: Actually, 13 seconds; from 17:41:04 to 17:41:17. – robjohn Oct 19 '12 at 18:34

Just take $f\colon [0,1]\to\mathbb{R}$ given by $$f(x)=\begin{cases}1/x&x\in(0,1],\\0&x=0.\end{cases}$$
Consider $$f(x)=\left\{\begin{array}{}\frac1x&\text{when }x>0\\[6pt]0&\text{when }x\le0\end{array}\right.$$ on $[-1,1]$.
On the interval $[0,1]$, let $$f(t)=\begin{cases} 0&\mbox{ if } t=0\\ \\\ \frac1t&\mbox{ if }t>0\end{cases}$$