# Sequence of Polynomials and Weierstrass's Approximation Theorem

I've been stuck on the following problem for a some time: Let $f$ be a continuous function on $[a,b]$. Show that there exists a sequence $(p_n)$ of polynomials such that $p_n \to f$ uniformly on $[a,b]$ and such that $p_n(a) = f(a)$ for all $n$.

Since $f$ is a continuous function on $[a,b]$, I know by the Weierstrass Approximation Theorem that there exists a sequence $(p_n)$ of polynomials such that $p_n \to f$ uniformly on $[a,b]$.

But I had trouble trying to show that $p_n(a) = f(a)$ for all $n$.

This is what I tried:

Direct Approach: Since I know $p_n \to f$ uniformly on $[a,b]$, by definition $(\forall \varepsilon > 0)(\exists N_0 \in \mathbb{N})$ such that $(\forall n > N_0)(\forall x \in [a,b])$ we have $|p_n(x) - f(x)| < \varepsilon$. Then for $n > N_0$ if I plug in $x=a$, I would be done. For the case $n \leq N_0$, I thought about bounding $|p_n(x) - f(x)|$ but got stuck.

Proof by Contradiction: Suppose that there exists an $n$ such that $p_n(a) \neq f(a)$. Suppose if $f(a) > p_n(a)$ and let $\varepsilon = f(a) - p_n(a)$. I tried using the definition of $p_n \to f$ uniformly on $[a,b]$, but didn't see how to get a contradiction.

I've thought about the contrapositive as well but didn't think that approach would be successful.

Are all of my approaches dead ends? Any hints would be appreciated.

• You cannot show that $p_n(a)=f(a)$. That is false, because there exist sequences of polynomials which converge uniformly, without being equal at the endpoints. You need to construct a sequence of polynomials which converge uniformly to $f$ such that $p_n(a)=f(a)$. – Beni Bogosel Jul 17 '13 at 17:27
• @BeniBogosel: I see I probably misunderstood the question. Could you give me a hint as to how to do so? – Student Jul 17 '13 at 17:30
• Choose your $N_0$ so that $|p_n(x) - f(x)| < \frac{\varepsilon}{2}$ and then add $f(a)-p_n(a)$ to $p_n(x)$. – Mikhail Katz Jul 17 '13 at 17:30

Consider a sequence of polynomials $p_n$ which converges uniformly to $f$. Then define $q_n(x)=p_n(x)+f(a)-p_n(a)$. Then $q_n(a)=f(a)$, $q_n$ is obviously a polynomial and $$|q_n(x)-f(x)| \leq |p_n(x)-f(x)|+|f(a)-p_n(a)|$$ which proves that $q_n$ converges uniformly to $f$.
• Just tried to make the values in $a$ equal to $f(a)$, and then realized that adding a sequence which converges to zero to a uniformly convergent sequence doesn't influence its limit. – Beni Bogosel Jul 17 '13 at 17:55