# Uniform convergence exercise

This was a question asked to me in an exam which I couldn't answer:
Let $$g:[0,1]\to \Bbb R$$ be a continuous function, such that $$0 for all $$x\in[0,1]$$. Let $$f_n :[0,1] \to \Bbb R$$ be a sequence of functions. Prove that if $$f_n$$ converges uniformly to $$\mathit g$$ then there exists $$n_0 \in \Bbb N$$ such that $$0< f_n (x)< 1$$ for all $$n\geqslant n_0 ,\text{ for all x \in [0,1]}$$.

What I tried to do was using the definition of uniform convergence, given $$\varepsilon >0\$$there exists $$n_0$$ such that for all $$n \geqslant n_0$$, $$|f_n - g|<\varepsilon$$. This would mean that $$-\varepsilon < f_n - g < \varepsilon$$. Therefore, $$-\varepsilon + g < f_n < \varepsilon + g$$ and since $$0, $$-\varepsilon + 0< -\varepsilon + g< f_n < \varepsilon + g <\varepsilon + 1.$$ So, $$-\varepsilon. I don't know how to go from here. Any help would be appreciated.

• Since $g$ is continuous and $[0, 1]$ is compact, $\|g\| = \sup g < 1$ and then, $\|f_n - g\| < 1 -\|g\|$ for all large $n,$ this implies $\sup f_n < 1$ for all large $n.$ The case $0 < \inf f_n$ is similar. – Will M. Dec 17 '18 at 21:55

Let $$M=\max g$$ and let $$m=\min G$$. Then $$0. Take $$\varepsilon>0$$ such that, $$\varepsilon and that $$\varepsilon<1-M$$. THere is a natural $$N$$ such that$$(\forall n\in\mathbb{N})(\forall x\in[0,1]):n\geqslant N\implies\bigl\lvert g(x)-f_n(x)\bigr\rvert<\varepsilon.$$But then, since$$(\forall x\in[0,1]):m\leqslant g(x)\leqslant M$$and since $$\varepsilon and $$\varepsilon<1-M$$, we have$$(\forall x\in[0,1]):0
• By the same argument, $f_N(x)>0$. – José Carlos Santos Dec 17 '18 at 21:49
Since $$g$$ is continuous on a compact set we have that $$0 for all $$x\in [0,1]$$. Let $$n_0$$ be large enough so for $$n\geq n_0$$, $$|f_n(x)-g(x)|<\min(m,1-M)$$ for all $$x\in [0,1]$$. Then for all $$x\in[0,1]$$ $$f_n(x)= (f_n(x)-g(x))+g(x)<(1-M)+M<1$$ and $$-f_n(x)=(g(x)-f_n(x))-g(x)< m-m=0\implies 0