Pointwise supremum of upper semicontinuous continuous functions is upper semicontinuous

real-analysis

https://en.wikipedia.org/wiki/Semi-continuity
As in the properties on the page, the pointwise infimum of a collection of upper semicontinuous functions is upper semicontinuous. And I guess it would not be true for the pointwise supremum and I am looking for a counterexample. Any help would be really appreciated.

Best Answer

Let $f_n(x)=1$ for $x \geq \frac 1 n$ and $0$ for $x <\frac 1 n$. Then $f_n$ is u.s.c. for each $n$ and $\sup_n f_n(x)=1$ for $x >0$, $0$ for $x \leq 0$. This limit function is not u.s.c. (since it is less than $1$ exactly when $x \leq 0$).