You can even find a polynomial that will do this (that is the Weierstrass approximation theorem). A concrete way to construct a polynomial that approximates a given continuous function to any desired degree of accuracy is to use Bernstein polynomials.