In the mathematical field of numerical analysis, a Bernstein polynomial is a polynomial expressed as a linear combination of Bernstein basis polynomials. The idea is named after mathematician Sergei Natanovich Bernstein.
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.
A numerically stable way to evaluate polynomials in Bernstein form is de Casteljau's algorithm.
The n+1 Bernstein basis polynomials of degree n are defined as
b\nu,n(x)l{:}l{=}\binom{n}{\nu}x\nu\left(1-x\right)n, \nu=0,\ldots,n,
where
\tbinom{n}{\nu}
So, for example,
b2,5(x)=\tbinom{5}{2}x2(1-x)3=10x2(1-x)3.
The first few Bernstein basis polynomials for blending 1, 2, 3 or 4 values together are:
\begin{align} b0,0(x)&=1,\\ b0,1(x)&=1-x,&b1,1(x)&=x\\ b0,2(x)&=(1-x)2,&b1,2(x)&=2x(1-x),&b2,2(x)&=x2\\ b0,3(x)&=(1-x)3,&b1,3(x)&=3x(1-x)2,&b2,3(x)&=3x2(1-x),&b3,3(x)&=x3 \end{align}
\Pin
A linear combination of Bernstein basis polynomials
Bn(x)
n | |
l{:}l{=}\sum | |
\nu=0 |
\beta\nub\nu,n(x)
is called a Bernstein polynomial or polynomial in Bernstein form of degree n. The coefficients
\beta\nu
The first few Bernstein basis polynomials from above in monomial form are:
\begin{align} b0,0(x)&=1,\\ b0,1(x)&=1-1x,&b1,1(x)&=0+1x\\ b0,2(x)&=1-2x+1x2,&b1,2(x)&=0+2x-2x2,&b2,2(x)&=0+0x+1x2\\ b0,3(x)&=1-3x+3x2-1x3,&b1,3(x)&=0+3x-6x2+3x3,&b2,3(x)&=0+0x+3x2-3x3,&b3,3(x)&=0+0x+0x2+1x3 \end{align}
The Bernstein basis polynomials have the following properties:
b\nu,(x)=0
\nu<0
\nu>n.
b\nu,(x)\ge0
x\in[0, 1].
b\nu,\left(1-x\right)=bn(x).
b\nu,(0)=\delta\nu,
b\nu,(1)=\delta\nu,
\delta
\deltaij=\begin{cases} 0&ifi ≠ j,\\ 1&ifi=j. \end{cases}
b\nu,(x)
\nu
x=0
\nu=0
b\nu,(x)
\left(n-\nu\right)
x=1
\nu=n
n\ne0
b\nu,(x)
[0,1]
x=
\nu | |
n |
n
x
(x+y)n
y
y=1-x
x
(x+y)n
y
y=1-x
Let ƒ be a continuous function on the interval [0, 1]. Consider the Bernstein polynomial
Bn(f)(x)=
n | |
\sum | |
\nu=0 |
f\left(
\nu | |
n |
\right)b\nu,n(x).
It can be shown that
\limn{Bn(f)}=f
uniformly on the interval [0, 1].[3]
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
R
A more general statement for a function with continuous kth derivative is
{\left\|
(k) | |
B | |
n(f) |
\right\|}infty\le
(n)k | |
nk |
\left\|f(k)\right\|infty and \left\|f(k)-
(k) | |
B | |
n(f) |
\right\|infty\to0,
(n)k | |
nk |
=\left(1-
0 | |
n |
\right)\left(1-
1 | |
n |
\right) … \left(1-
k-1 | |
n |
\right)
This proof follows Bernstein's original proof of 1912. See also Feller (1966) or Koralov & Sinai (2007).[5]
\operatorname{lE}\left[ | K |
n |
\right]=x
p(K)={n\chooseK}xK\left(1-x\right)n=bK,n(x)
By the weak law of large numbers of probability theory,
\limn{P\left(\left|
K | |
n |
-x\right|>\delta\right)}=0
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
\limn{P\left(\left|f\left(
K | |
n |
\right)-f\left(x\right)\right|>\varepsilon\right)}=0
uniformly in x. Taking into account that ƒ is bounded (on the given interval) one gets for the expectation
\limn{\operatorname{lE}\left(\left|f\left(
K | |
n |
\right)-f\left(x\right)\right|\right)}=0
Finally, one observes that the absolute value of the difference between expectations never exceeds the expectation of the absolute value of the difference, and
\operatorname{lE}\left[f\left( | K |
n |
\right)\right]=
n | ||
\sum | f\left( | |
K=0 |
K | |
n |
\right)p(K)=
n | ||
\sum | f\left( | |
K=0 |
K | |
n |
\right)bK,n(x)=Bn(f)(x)
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:
\sumk{n\choosek}xk(1-x)n-k=1
\sumk{k\overn}{n\choosek}xk(1-x)n-k=x
\sumk\left(x-{k\overn}\right)2{n\choosek}xk(1-x)n-k={x(1-x)\overn}.
In fact, by the binomial theorem
and this equation can be applied twice to
t | d |
dt |
t=x/(1-x)
Within these three identities, use the above basis polynomial notation
bk,n(x)={n\choosek}xk(1-x)n-k,
and let
fn(x)=\sumkf(k/n)bk,n(x).
Thus, by identity (1)
fn(x)-f(x)=\sumk[f(k/n)-f(x)]bk,n(x),
so that
|fn(x)-f(x)|\le\sumk|f(k/n)-f(x)|bk,n(x).
Since f is uniformly continuous, given
\varepsilon>0
\delta>0
|f(a)-f(b)|<\varepsilon
|a-b|<\delta
M=\sup|f|<infty
|fn(x)-f(x)|\le\sum|x|<\delta}|f(k/n)-f(x)|bk,n(x)+\sum|x|\ge\delta}|f(k/n)-f(x)|bk,n(x).
The first sum is less than ε. On the other hand, by identity (3) above, and since
|x-k/n|\ge\delta
2M
\sum|xbk,n(x)\le\sumk\delta-2\left(x-{k\overn}\right)2bk,n(x)=\delta-2{x(1-x)\overn}<{1\over4}\delta-2n-1.
It follows that the polynomials fn tend to f uniformly.
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
\sum | |
i1 |
\sum | |
i2 |
…
\sum | |
ik |
{n1\choosei1}{n2\choosei2} … {nk\chooseik} f\left({i1\overn1},{i2\overn2},...,{ik\overnk}\right)
i1 | |
x | |
1 |
n1-i1 | |
(1-x | |
1) |
i2 | |
x | |
2 |
n2-i2 | |
(1-x | |
2) |
…
ik | |
x | |
k |
nk-ik | |
(1-x | |
k) |
. Isidor Natanson . Constructive function theory. Volume I: Uniform approximation . Alexis N. Obolensky . 0133.31101 . 0196340 . New York . Frederick Ungar . 1964 .