Proof check - small lemma related to Weierstrass Approximation Theorem

29 Views Asked by At

Let $K \subseteq \mathbb R$ be a compact set such that $0 \in K$ and let $f: K \to \mathbb R$ be a continuous function such that $f(0) = 0$. By Weierstrass Approximation Theorem there exists a sequence of polynomials $(q_n)_{n=1}^{\infty}$ that converges uniformly to $f$.
Prove/disprove: There exists a sequence of polynomials $(p_n)_{n=1}^{\infty}$ such that $p_n(0)=0$ for all $n \in \mathbb N$ that converges uniformly to $f$.

My attempt:
Let $\epsilon >0$. Denote $c_n = q_n(0)$ for all $n\in \mathbb N$. Uniform convergence implies pointwise converges so $c_n$ converges to $f(0)=0$. So there exists $N_1 \in \mathbb N$ such that $|c_n|<\frac{\epsilon}{2}$ for all $n>N_1$. By uniform convergence of $q_n$, there exists $N_2 \in \mathbb N$ such that $\sup_K|q_n(x)-f(x)|<\frac{\epsilon}{2}$ for all $n > N_2$.
Now, define $(p_n)_{n=1}^{\infty}$ as $p_n = q_n-c_n$ for all $n \in \mathbb N$. So, for all $n>\max\{N_1,N_2\}$, using the triangle inequality:
$$ \sup_K|p_n(x)-f(x)|=\sup_K|q_n(x)-c_n-f(x)| \leq \sup_K(|q_n(x)-f(x)|+|c_n|) < \sup_K(\frac{\epsilon}{2} + \frac{\epsilon}{2})<\epsilon $$

Therefore $p_n$ is a sequence of polynomials satisfying $p_n(0)=0$ for all $n \in \mathbb N$ that convergence uniformly to $f$, and we are done.

I would appreciate anyone checking my attempt.
Also, I'm wondering: Is it always possible to alter the sequence of the constant terms in the polynomial sequence and still get a uniform convergent sequence? Or, is it possible to "modify" the sequence in accordance with the values of the approximated function?