Bernstein polynomial

In the mathematical field of numerical analysis, a Bernstein polynomial is a polynomial that is a linear combination of Bernstein basis polynomials. The idea is named after Sergei Natanovich Bernstein.
A numerically stable way to evaluate polynomials in Bernstein form is de Casteljau's algorithm.
Polynomials in Bernstein form were first used by Bernstein in a constructive proof for the Weierstrass approximation theorem. With the advent of computer graphics, Bernstein polynomials, restricted to the interval [0, 1], became important in the form of Bézier curves.
Definition.
The "n"+1 Bernstein basis polynomials of degree "n" are defined as
where formula_2 is a binomial coefficient. So, for example, formula_3
The first few Bernstein basis polynomials for blending 1, 2, 3 or 4 values together are:
The Bernstein basis polynomials of degree "n" form a basis for the vector space formula_5 of polynomials of degree at most "n" with real coefficients. A linear combination of Bernstein basis polynomials
is called a Bernstein polynomial or polynomial in Bernstein form of degree "n". The coefficients formula_7 are called Bernstein coefficients or Bézier coefficients.
The first few Bernstein basis polynomials from above in monomial form are:
Properties.
The Bernstein basis polynomials have the following properties:
Approximating continuous functions.
Let "ƒ" be a continuous function on the interval [0, 1]. Consider the Bernstein polynomial
It can be shown that
uniformly on the interval [0, 1].
Bernstein polynomials thus provide one way to prove the Weierstrass approximation theorem that every real-valued continuous function on a real interval ["a", "b"] can be uniformly approximated by polynomial functions over formula_53.
A more general statement for a function with continuous "k"th derivative is
where additionally
is an eigenvalue of "B""n"; the corresponding eigenfunction is a polynomial of degree "k".
Probabilistic proof.
This proof follows Bernstein's original proof of 1912. See also Feller (1966) or Koralov & Sinai (2007).
Suppose "K" is a random variable distributed as the number of successes in "n" independent Bernoulli trials with probability "x" of success on each trial; in other words, "K" has a binomial distribution with parameters "n" and "x". Then we have the expected value formula_56 and
By the weak law of large numbers of probability theory,
for every "δ" > 0. Moreover, this relation holds uniformly in "x", which can be seen from its proof via Chebyshev's inequality, taking into account that the variance of  "K", equal to  "x"(1−"x"), is bounded from above by irrespective of "x".
Because "ƒ", being continuous on a closed bounded interval, must be uniformly continuous on that interval, one infers a statement of the form
uniformly in "x". Taking into account that "ƒ" is bounded (on the given interval) one gets for the expectation
uniformly in "x". To this end one splits the sum for the expectation in two parts. On one part the difference does not exceed "ε"; this part cannot contribute more than "ε".
On the other part the difference exceeds "ε", but does not exceed 2"M", where "M" is an upper bound for |"ƒ"(x)|; this part cannot contribute more than 2"M" times the small probability that the difference exceeds "ε".
Finally, one observes that the absolute value of the difference between expectations never exceeds the expectation of the absolute value of the difference, and 
Elementary proof.
The probabilistic proof can also be rephrased in an elementary way, using the underlying probabilistic ideas but proceeding by direct verification:
The following identities can be verified:
(1) formula_62 
(2) formula_63 
(3) formula_64
In fact, by the binomial theorem
and this equation can be applied twice to formula_66. The identities (1), (2), and (3) follow easily using the substitution formula_67.
Within these three identities, use the above basis polynomial notation
and let
Thus, by identity (1)
so that
Since "f" is uniformly continuous, given formula_72, there is a formula_73 such that formula_74 whenever
formula_75. Moreover, by continuity, formula_76. But then
The first sum is less than ε. On the other hand, by identity (3) above, and since formula_78, the second sum is bounded by 2"M" times
It follows that the polynomials "f""n" tend to "f" uniformly.
Generalizations to higher dimension.
Bernstein polynomials can be generalized to dimensions. The resulting polynomials have the form . In the simplest case only products of the unit interval are considered; but, using affine transformations of the line, Bernstein polynomials can also be defined for products . For a continuous function on the -fold product of the unit interval, the proof that can be uniformly approximated by
is a straightforward extension of Bernstein's proof in one dimension.