If $0 \notin [a,b]$, show that every continuous function $f$ on $[a,b]$ is the uniform limit of a seq of polynomials $(q_{n})$, where $q_{n}(x) = x^{n}p_{n}(x)$ for polynomials $p_{n}$.
There was a solution presented for this question (Show that every continuous functions on closed interval is the uniform limit of a sequence of polynomial), but I worked with my prof and he provided a different solution, but I am trying to understand the thinking behind mainly the initial steps.
Solution:
1) Define: $$F(x) = \Bigg\{ \begin{array}{11} f(x), & x \in [a,b] \\ \frac{f(a)}{a}(x-a) + f(a) & x\in [0,a] \end{array}$$
2) By the Weirstrauss Approximation Theorem( Not Stone - Weirstrauss, but the simpler version). There exists a polynomial $p_{n}(x) \to F(x)$ uniformly on $[0,b]$.
3) Define polynomial $q_{n}(x) = p_{n}(x) - p_{n}(0)$. Note: $p_{n}(0) \to 0 = f(0).$
4) Therefore: $$\|q_{n}(x) - f(x)\|_{\infty} = \sup_{x \in [a,b]}|q_{n}(x) - f(x)| \leq \sup_{x \in [a,b]}|q_{n}(x) - F(x)| \leq \sup_{x \in [a,b]} |p_{n}(x) - F(x)| + |p_{n}(0)| < \frac{\epsilon}{2} +\frac{\epsilon}{2} = \epsilon $$
5) Therefore we showed that $q_{n}(x) \to f(x)$ uniformly and in particular this means $q_{n}(0) = 0$. So by the Fundamental Theorem of Algebra this implies $q_{n}(x)$ is of the form $q_{n}(x) = x^{k}g(x)$, for some polynomial $g(x)$.
Thoughts: I am working dearly on trying to elevate my mathematical thinking. As such I have some questions about the process my professor went through:
1) Where did the idea to define this new function $F(x)$ come from? He mentioned that he wanted to create an extension and I vaguely understand what was meant, but I don't see how he came to that conclusion. As in, "we have our function $f(x)$ and by Weirstrauss there exists a sequence of approximating polynomials...". This is what ran through my head, but he obvioulsy knew to extrapolate even more from that.
3) Why define the polynomial $q_{n}(x)$ in the form that was done? What was the impetus for this move?
5) I see how the FTA can be applied at this stage, but I would've never have thought to show the uniform convergence in this fashipn and then draw the conclusion that was drawn. It's as if he knew this should be the process to arrive at the result before even doing the problem.
These things are racking my brain, because he did not have a solution written out before hand and he just observed the question took about 15 mins and solved it. I was toiling with it for a day and made zero progress. What kind of questions should I be asking myself between each step to improve my problem solving/proof writing skill set?
I don't think the solution given to you quite works: the result to prove is that $f$ is the uniform limit of a sequence of polynomials $x^np_n(x)$.
What your teacher proved was that it is a limit of a sequence of polynomials of the form $x^{k_n}p_n(x)$, with the only guarantee that $k_n>0$ (but it might well be constant equal to $1$).
The most straight-forward proof I can think of is to take $p_n$ such that for all $x\in[a,b]$: $$|f(x).x^{-n}-p_n(x)|<\frac{\max(|a|,|b|)^{-n}}n$$ which you can by Weierstrass approximation theorem, given that $0\not\in[a,b]$.
It follows almost immediatly by construction that $|f(x)-x^np_n(x)|<\frac1n$ and thus that $x\mapsto x^np_n(x)$ converges uniformly to $f$.
Your teacher's idea can still be made to work, but I think it becomes a bit convoluted.