Let $f:\left[\frac{1}{2} ,1\right] \rightarrow \mathbb R$ be a continuous function, $\{g_n\}_{n=1}^{\infty}$ a sequence of functions where $g_n(x) = x^n f(x)$, with $x \in \left[\frac{1}{2} ,1\right]$ and $n \in \mathbb{N}$.
Show that
a) the sequence of functions $\{g_n\}$ is convergent on $\left[\frac{1}{2} ,1\right]$.
b) $\{g_n\}$ is uniformly convergent on $\left[\frac{1}{2} ,1\right]$ if and only if f is bounded on $\left[\frac{1}{2} ,1\right]$ and $f(1)=0$.
I'm struggling with this problem and looking for any help. Thanks!
We have $$\lim_{n\to\infty}g_n(x)=\lim_{n\to\infty}x^nf(x)=\left\{\begin{array}{cl} 0&\mathrm{if}\, x\in[\frac{1}{2},1)\\ f(1)&\mathrm{if}\, x=1 \end{array}\right.$$ Since $f$ is continuous on the compact $[\frac{1}{2},1]$ then it's bounded so we'll prove that $(g_n)$ is uniformly convergent if and only if $f(1)=0$.
If $(g_n)$ is uniformly convergent and since it's continuous then it's pointwise limit is also continuous and hence $f(1)=0$.
Now suppose that $f(1)=0$ and since $|g_n|$ is continuous on the compact $[\frac{1}{2},1]$ then its supremum is atteined on a point $a_n\in[\frac{1}{2},1)$ then $$||g_n||_\infty=a_n^n|f(a_n)|$$ By Weierstrass theorem $(a_n)$ has a convergent subsequence $(a_{\varphi(n)}$) and if its limit is $1$ then $$0\leq||g_{\varphi(n)}||_\infty\leq|f(a_{\varphi(n)})|\to|f(1)|=0$$ and if its limit is $\ell\not=1$ then $$0\leq||g_{\varphi(n)}||_\infty\leq(\ell+\epsilon)^n||f||_\infty\to0$$ where $\epsilon $ is such that $\ell+\epsilon<1$.
Hence we proved that $\lim_{n\to\infty}||g_n||_\infty=0$ and this allows us to conclude.