Supremum and infimum of continuous functions on $[a,b]$ Let $\{ f_\alpha (x) \}_{\alpha \in I }$ a family of continuous functions from $[a,b]$ to $\Bbb{R}$ ($  a<b $). Now we know because $[a,b]$ is compact then  every $f_\alpha$ is uniformly continuous and every $f_\alpha $ has maximum and minimum.
My questions are :


*

*Let $f(x) = \sup  \{ f_\alpha (x) \} _{\alpha \in I }$ for $x \in [a,b] $ , is $f$ uniformly continuous ?

*Let $f(x) = \inf\{ f_\alpha (x) \} _{\alpha \in I }$ for $x \in [a,b] $ , is $f$ uniformly continuous ?
In the special case where we have $ k(x) = \max \{ f(x), g(x) \}$ and  $u(x) = \min \{ f(x), g(x) \}$, then we know $k(x)$ and $u(x)$ are continuous functions and because $[a,b]$ is compact then  $k(x)$ and $u(x)$ are uniformly continuous.

This is wrong in general.
Define $$f_n : [0,1] \to [0,1] \qquad f_n(x) = \begin{cases}
nx & 0≤x<\frac{1}{n}\\
1 & \frac{1}{n}≤x<1-\frac{1}{n}\\
n-nx & 1-\frac{1}{n} ≤ x ≤ 1 \end{cases} $$
Here is a picture for $n=5$ : 

Then $f_n$ is uniformly continuous since it is continuous on a compact set. But $$f(x) = \sup\{f_n(x) \mid n ≥ 1\} = \begin{cases}
1 & 0<x<1\\
0 & x=0,x=1\\ \end{cases}$$ is not even continuous.
You can find similar examples for the $\inf$. (Actually the result has no meaning in general, see for instance $f_n(x)=n$ since $\sup f_n = +\infty$ is not a real-valued function).
