Application of Weierstrass approximation theorem

473 Views Asked by At

How to approximate a continuous function to a desired accuracy using a polynomial?

Theorem: For any $\varepsilon > 0$ and $f \in C([a,b])$, there exists a polynomial $p$ such that $\sup_{x \in [a,b]} |f(x)-p(x)| < \varepsilon$.

When the interval is $[0,1]$, for polynomial approximations to a given $f \in C([0,1])$ we use Bernstein polynomials $$ B_{n,f}(x) = \sum_{k=0}^n \binom{n}{k}f(k/n)x^k (1-x)^{n-k}. $$ What I want to know is how to find $n$, the degree, to find a Bernstein polynomial for a given continuous function that approximates the function to within a specified $\varepsilon$. Can anyone explain how to find it?