Bernstein polynomial explained

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.

Definition

Bernstein basis polynomials

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}

is a binomial coefficient.

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

of polynomials of degree at most n with real coefficients.

Bernstein polynomials

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

are called Bernstein coefficients or Bézier coefficients.

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}

Properties

The Bernstein basis polynomials have the following properties:

b\nu,(x)=0

, if

\nu<0

or

\nu>n.

b\nu,(x)\ge0

for

x\in[0, 1].

b\nu,\left(1-x\right)=bn(x).

b\nu,(0)=\delta\nu,

and

b\nu,(1)=\delta\nu,

where

\delta

is the Kronecker delta function:

\deltaij=\begin{cases} 0&ifij,\\ 1&ifi=j. \end{cases}

b\nu,(x)

has a root with multiplicity

\nu

at point

x=0

(note: if

\nu=0

, there is no root at 0).

b\nu,(x)

has a root with multiplicity

\left(n-\nu\right)

at point

x=1

(note: if

\nu=n

, there is no root at 1).

n\ne0

, then

b\nu,(x)

has a unique local maximum on the interval

[0,1]

at

x=

\nu
n
. This maximum takes the value \nu^\nu n^ \left(n - \nu \right)^ .

n

form a partition of unity: \sum_^n b_(x) = \sum_^n x^\nu \left(1 - x\right)^ = \left(x + \left(1 - x \right) \right)^n = 1.

x

-derivative of

(x+y)n

, treating

y

as constant, then substituting the value

y=1-x

, it can be shown that \sum_^ \nu b_(x) = nx.

x

-derivative of

(x+y)n

, with

y

again then substituted

y=1-x

, shows that \sum_^\nu(\nu-1) b_(x) = n(n-1)x^2.

Approximating continuous functions

Let ƒ be a continuous function on the interval [0,&nbsp;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,&nbsp;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'',&nbsp;''b''] can be uniformly approximated by polynomial functions over 

R

.[4]

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,

where additionally
(n)k
nk

=\left(1-

0
n

\right)\left(1-

1
n

\right)\left(1-

k-1
n

\right)

is an eigenvalue of Bn; 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).[5]

Motivation

We will first give intuition for Bernstein's original proof. A continuous function on a compact interval must be uniformly continuous. Thus, the value of any continuous function can be uniformly approximated by its value on some finite net of points in the interval. This consideration renders the approximation theorem intuitive, given that polynomials should be flexible enough to match (or nearly match) a finite number of pairs

(x,f(x))

. To do so, we might (1) construct a function close to

f

on a lattice, and then (2) smooth out the function outside the lattice to make a polynomial.

The probabilistic proof below simply provides a constructive method to create a polynomial which is approximately equal to

f

on such a point lattice, given that "smoothing out" a function is not always trivial. Taking the expectation of a random variable with a simple distribution is a common way to smooth. Here, we take advantage of the fact that Bernstein polynomials look like Binomial expectations. We split the interval into a lattice of n discrete values. Then, to evaluate any f(x), we evaluate f at one of the n lattice points close to x, randomly chosen by the Binomial distribution. The expectation of this approximation technique is polynomial, as it is the expectation of a function of a binomial RV. The proof below illustrates that this achieves a uniform approximation of f. The crux of the proof is to (1) justify replacing an arbitrary point with a binomially chosen lattice point by concentration properties of a Binomial distribution, and (2) justify the inference from

xX

to

f(x)f(X)

by uniform continuity.

Bernstein's proof

\operatorname{lE}\left[K
n

\right]=x

and

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 for each

\epsilon>0

. Taking into account that ƒ is bounded (on the given interval) one finds that

\limn{\operatorname{lE}\left(\left|f\left(

K
n

\right)-f\left(x\right)\right|\right)}=0

uniformly in x. To justify this statement, we use a common method in probability theory to convert from closeness in probability to closeness in expectation. One splits the expectation of

\left|f\left(

K
n

\right)-f\left(x\right)\right|

into two parts split based on whether or not

\left|f\left(

K
n

\right)-f\left(x\right)\right|<\epsilon

. In the interval where the difference does not exceed ε, the expectation clearly cannot exceed ε.In the other interval, the difference still cannot exceed 2M, where M is an upper bound for |ƒ(x)| (since uniformly continuous functions are bounded). However, by our 'closeness in probability' statement, this interval cannot have probability greater than ε. Thus, this part of the expectation contributes no more than 2M times ε. Then the total expectation is no more than

\epsilon+2M\epsilon

, which can be made arbitrarily small by choosing small ε.

Finally, one observes that the absolute value of the difference between expectations never exceeds the expectation of the absolute value of the difference, a consequence of Holder's Inequality. Thus, using the above expectation, we see that (uniformly in x)

\limn{\left|\operatorname{lE}f\left(

K
n

\right)-\operatorname{lE}f\left(x\right)\right|}\leq\limn{\operatorname{lE}\left(\left|f\left(

K
n

\right)-f\left(x\right)\right|\right)}=0

Noting that our randomness was over K while x is constant, the expectation of f(x) is just equal to f(x). But then we have shown that

\operatorname{lEx}f\left(

K
n

\right)

converges to f(x). Then we will be done if

\operatorname{lEx}f\left(

K
n

\right)

is a polynomial in x (the subscript reminding us that x controls the distribution of K). Indeed it is:
\operatorname{lE
x}\left[f\left(K
n

\right)\right]=

n
\sumf\left(
K=0
K
n

\right)p(K)=

n
\sumf\left(
K=0
K
n

\right)bK,n(x)=Bn(f)(x)

Uniform convergence rates between functions

\omega.

It also depends on 'M', the absolute bound of the function, although this can be bypassed if one bounds

\omega

and the interval size. Thus, the approximation only holds uniformly across x for a fixed f, but one can readily extend the proof to uniformly approximate a set of functions with a set of Bernstein polynomials in the context of equicontinuity.

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:

\sumk{n\choosek}xk(1-x)n-k=1

("probability")

\sumk{k\overn}{n\choosek}xk(1-x)n-k=x

("mean")

\sumk\left(x-{k\overn}\right)2{n\choosek}xk(1-x)n-k={x(1-x)\overn}.

("variance")

In fact, by the binomial theorem

(1+t)^n = \sum_k t^k,

and this equation can be applied twice to

td
dt
. The identities (1), (2), and (3) follow easily using the substitution

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

, there is a

\delta>0

such that

|f(a)-f(b)|<\varepsilon

whenever

|a-b|<\delta

. Moreover, by continuity,

M=\sup|f|<infty

. But then

|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

, the second sum is bounded by

2M

times

\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.

(Chebyshev's inequality)

It follows that the polynomials fn 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

\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)

is a straightforward extension of Bernstein's proof in one dimension.

See also

Notes

  1. 1802.09518 . R. J. . Mathar . 2018 . Orthogonal basis function over the unit circle with the minimax property . math.NA . Appendix B.
  2. Abedallah. Rababah . Transformation of Chebyshev-Bernstein Polynomial Basis . 10.2478/cmam-2003-0038. 2003. Comp. Meth. Appl. Math.. 3. 4 . 608–622 . 120938358. free.
  3. Natanson (1964) p. 6
  4. Natanson (1964) p. 3
  5. Book: L. . Koralov . Y. . Sinai . Theory of probability and random processes . 2nd . Springer . 2007 . 29 . "Probabilistic proof of the Weierstrass theorem".

References

. Isidor Natanson . Constructive function theory. Volume I: Uniform approximation . Alexis N. Obolensky . 0133.31101 . 0196340 . New York . Frederick Ungar . 1964 .

External links