Let $f_n(x)=x^n$. The sequence $\{f_n(x)\}$ converge pointwise but no uniformly on $[0,1]$. Let $g$ be continuous on $[0,1]$ with $g(1)=0$. Prove that the sequence $\{g(x)x^n\}$ converge uniformly on $[0,1]$.
My attempt: Since $g$ is continuous on $[0,1]$ it is uniformly continuous on $[0,1]$. So $$\forall \; \epsilon >0, \exists \; \delta(\epsilon): |x-y|<\delta \, \Rightarrow \, |g(x)-g(y)|<\epsilon$$
It is clear that $\lim_{n\rightarrow\infty}g(x)x^n=0$ for all $x \in [0,1]$. Then, i need to prove that, given $\epsilon > 0 $, there is a positive integer $N$ such that as $n \geq N$, then $|g(x)x^n|<\epsilon$. Since $g$ is continuous at $1$, then $$|x-1|<\delta \, \Rightarrow |g(x)-g(1)|=|g(x)|<\epsilon$$ So, we have $$|g(x)x^n|<|g(x)|<\epsilon,$$
but i'm stuck in the case $x \in [0,1)$
The trick is to think of $[0,1]$ as $[0,1-\delta] \cup [1-\delta,1]$, where $\delta=\delta(\varepsilon)$ is a small number. First we choose $\delta$ so that $g f_n \leq \varepsilon$ on $[1-\delta,1]$. Then we choose $N$ large enough to get $g f_n \leq \varepsilon$ on $[0,1-\delta]$ provided $n \geq N$. The former requires that $g$ is continuous and satisfies $g(1)=0$, while the latter requires that $g$ is bounded.