TITLE: Application of Weierstrass theorem
QUESTION [7 upvotes]: Let f be a continuously differentiable function on $[a.b]$. Show that there is a sequence of polynomials $\{P_n\}$ such that $P_n(x) \to f$ and $P'_n(x) \to f' (x)$ uniformly on $[a,b]$
My approach has been as follows.  Since f is continuously differentiable, we have $Q_n(x) \ to f'(x)$ on$ [a,b]$ uniformly (Weierstrass) .
I'm not sure how to find a polynomial that converges to f uniformly who's derivative is $Q(x)$. My first thought was $P(x)=\int_{a}^{x} Q(t)dt$. There is a relationship between uniform continuity and differentiation, but that requires convergence at a point. I'm having problems building a good argument for this part of the proof.

REPLY [2 votes]: A more general result
The Bernstein polynomial is defined on $[0,1]$ by
$$B_n(f)(x)=\sum_{i=0}^n f(\frac{i}{n})\binom{n}{i}x^i (1-x)^{n-i}$$
and if $f$ is a function with  continuous $k^{th}$ derivative then
$$||f^{(k)}-B_n(f)^{(k)}||_\infty\to_{n\to\infty}0$$
Note: we can pass from $[0,1]$ to $[a,b]$ by the affine function $x\mapsto ax+b(1-x)$.