# Approximating a function with a polynomials that uniformly converges

Consider f as a continuous function on [a,b]. How can I show that there exists a sequence {$P_n$} of polynomials such that $P_n \rightarrow f$ uniformlyon [a,b] and such that $P_n(a) = f(a)$ for all n ?

My effort on this question so far was to find Weierstrass's Approx. Thm which says that every continuous function on a closed interval[a,b] can be uniformly approximated by polynomials on [a,b].

The questions is then how to show $P_n(a) = f(a)$.

-

Without loss of generality, we can assume that $a=0$ and $b=1$. If this is not already the case, then we can use the change of variable $u = \frac{x-a}{b-a}$. Then $u$ ranges over $[0,1]$ as $x$ ranges over the original $[a,b]$.
Now look at the proof of the Weierstrass's Approximation Theorem using Bernstein polynomials on $[0,1]$. The polynomials $P_n$ constructed in that proof are:
$$P_n(u) = \sum_{k = 0}^{n} f(k/n) {n \choose k} u^k (1 - u)^{n - k}$$
Bernstein shows that these converge uniformly to the given function $f$. They all have the property that $P_n(0) = f(0)$. Actually, $P_n(1) = f(1)$ too, if that's of interest.
Hi @bubba, thanks for your answer. Can you elaborate a little more? I have Bernstein $P_n = \sum_{k = 0}^{n} f(k/n) {n \choose k} x^k (1 - x)^k$. Is that right? how to show $P_n(a)$ is equal to $f(a)$ then? – Sam Feb 14 '13 at 3:43
The $P_n$ you showed are for the interval $[0,1]$. It's fairly easy to show that $P_n(0) = f(0)$ and $P_n(1) = f(1)$. In either case, all the terms in the sum will be zero, except one. Write it out, and you'll see. To handle an arbitrary interval $[a,b]$, you just have to use a change of variable that does suitable scaling/shifting. In fact, I would start the proof by saying that we can assume WLOG that $a=0$ and $b=1$. – bubba Feb 14 '13 at 3:57