Let $C^0([a,b), \mathbb{R})$ be the vector space of continuous functions $f:[a,b]\to\mathbb{R}$ equipped with the sup norm and sup metric. Prove that the set $A=\{f \in C^0:f(x)\geq 0 \textrm{ for all }x\in[a,b]\}$ is closed in $C^0$.
I have proved that any sequence of functions $f_n\in A$ converges uniformly to a function $f\in C^0$. This is because $C^0$ is a complete metric space. But now I'm stuck. Is there something I'm missing?
You have proved that any sequence of functions $f_n \in A$ converges uniformly to a function $ f \in C^0$ ???? This is not true: take $f_n(x)=x^n$ , $[a,b]=[0,1]$
Let $ (f_n)$ be a uniformly convergent sequence in $A$ and denote by $f$ the limit function of $(f_n)$. It is well known that $f \in C^0([a,b], \mathbb{R})$
You have to show that $f(x) \ge 0 $ for all $x \in [a,b]$. But this is easy to see, since each $f_n \in A$ and $(f_n)$ converges pointwise to $f$.