Bernstein Polynomials
This file illustrates the use of Bernstein polynomials to uniformly approximate a continuous function in [0,1] as n gets large.
You can modify the function as you like (f(x)).
http://www.mathworks.com/help/symbolic/bernstein.html