Bernstein polynomial: Difference between revisions

From testwiki
Jump to navigation Jump to search
math typesetting
 
(No difference)

Latest revision as of 07:11, 25 February 2025

Template:Short description Template:For

Template:More footnotes needed

Bernstein polynomials approximating a curve

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.

Bernstein basis polynomials for 4th degree curve blending

Definition

Bernstein basis polynomials

The  n+1  Bernstein basis polynomials of degree  n  are defined as

 bν,n(x)  (nν) xν(1x)nν , for ν=0 ,  ,n ,

where  (nν)  is a binomial coefficient.

So, for example,  b2,5(x) = (52)x2(1x)3 = 10x2(1x)3.

The first few Bernstein basis polynomials for blending Template:Math or Template:Math values together are:

b0,0(x)=1 ,b0,1(x)=1x ,b1,1(x)=xb0,2(x)=(1x)2 ,b1,2(x)=2x(1x) ,b2,2(x)=x2b0,3(x)=(1x)3 ,b1,3(x)=3x(1x)2 ,b2,3(x)=3x2(1x) ,b3,3(x)=x3.

The Bernstein basis polynomials of degree  n  form a basis for the vector space  Πn  of polynomials of degree at most  n , all with real coefficients.

Bernstein polynomials

A linear combination of Bernstein basis polynomials

 Bn(x)  ν=0nβνbν,n(x) 

is called a Bernstein polynomial or polynomial in Bernstein form of degree  n.[1] The coefficients  βν  are called Bernstein coefficients or Bézier coefficients.

The first few Bernstein basis polynomials from above in monomial form are:

b0,0(x)=1 ,b0,1(x)=11x ,b1,1(x)=0+1xb0,2(x)=12x+1x2,b1,2(x)=0+2x2x2 ,b2,2(x)=0+0x+1x2b0,3(x)=13x+3x21x3 ,b1,3(x)=0+3x6x2+3x3 ,b2,3(x)=0+0x+3x23x3,b3,3(x)=0+0x+0x2+1x3.

Properties

The Bernstein basis polynomials have the following properties:

  •  bν,n(x)0 , if  ν<0  or if  ν>n.
  •  bν,n(x)0  for  x[0, 1].
  •  bν,n(1x)=bnν,n(x).
  •  bν,n(0)=δν,0  and  bν,n(1)=δν,n  where  δi,j  is the Kronecker delta function:  δij{0if ij ,1if i=j.
  •  bν,n(x)  has a root with multiplicity  ν  at point  x=0  (note: when  ν=0 , there is no root at Template:Math).
  •  bν,n(x)  has a root with multiplicity  (nν)  at point  x=1  (note: if  ν=n , there is no root at Template:Math).
  • The derivative can be written as a combination of two polynomials of lower degree:  bν,n(x)=n[ bν1,n1(x)  bν,n1(x) ].
  • The Template:Mvar-th derivative at Template:Math:  bν,n(k)(0) = n!(nk)!(kν)(1)ν+k.
  • The Template:Mvar-th derivative at 1:  bν,n(k)(1) = (1)kbnν,n(k)(0).
  • The transformation of the Bernstein polynomial to monomials is  bν,n(x) = (nν)k=0nν(nνk)(1)nνkxν+k = =νn(n)(ν)(1)νx , and by the inverse binomial transformation, the reverse transformation is[2]  xk = i=0nk(nki)(ni)bni,n(x) = 1(nk)j=kn(jk)bj,n(x).
  • The indefinite integral is given by  bν,n(x) dx=1n+1j=ν+1n+1bj,n+1(x).
  • The definite integral is constant for a given Template:Mvar:  01bν,n(x) dx=1n+1 for all ν=0,1,  ,n.
  • If  n0 , then bν,n(x)  has a unique local maximum on the interval  [0,1]  at  x=νn. This maximum takes the value  ννnn(nν)nν(nν).
  • The Bernstein basis polynomials of degree  n  form a partition of unity:  ν=0nbν,n(x) = ν=0n(nν)xν(1x)nν = (x+(1x))n=1.
  • By taking the first x-derivative of  (x+y)n , treating  y  as constant, then substituting the value  y=1x , it can be shown that  ν=0nν bν,n(x)=n x.
  • Similarly the second  x -derivative of  (x+y)n , with  y  then again substituted  y=1x , shows that  ν=1nν(ν1) bν,n(x)=n(n1) x2.
  • A Bernstein polynomial can always be written as a linear combination of polynomials of higher degree:  bν,n1(x) = (nνn) bν,n(x) + (ν+1n) bν+1,n(x).
  • The expansion of the Chebyshev Polynomials of the First Kind into the Bernstein basis is[3]  Tn(u) = (2n1)!! k=0n(1)nk  (2k1)!! (2n2k1)!!  bk,n(u).

Approximating continuous functions

Let ƒ be a continuous function on the interval [0, 1]. Consider the Bernstein polynomial

Bn(f)(x)=ν=0nf(νn)bν,n(x).

It can be shown that

limnBn(f)=f

uniformly on the interval [0, 1].[4][1][5][6]

Bernstein polynomials thus provide one way to prove the Weierstrass approximation theorem that every real-valued continuous function on a real interval [ab] can be uniformly approximated by polynomial functions over .[7]

A more general statement for a function with continuous kth derivative is

Bn(f)(k)(n)knkf(k) and f(k)Bn(f)(k)0,

where additionally

(n)knk=(10n)(11n)(1k1n)

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.[8] See also Feller (1966) or Koralov & Sinai (2007).[9][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

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 [Kn]=x  and

p(K)=(nK)xK(1x)nK=bK,n(x)

By the weak law of large numbers of probability theory,

limnP(|Knx|>δ)=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 Template:Frac K, equal to Template:Frac x(1−x), is bounded from above by Template:Frac 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

limnP(|f(Kn)f(x)|>ε)=0

uniformly in x for each ϵ>0. Taking into account that ƒ is bounded (on the given interval) one finds that

limn(|f(Kn)f(x)|)=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 |f(Kn)f(x)| into two parts split based on whether or not |f(Kn)f(x)|<ϵ. 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 ϵ+2Mϵ, 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|f(Kn)f(x)|limn(|f(Kn)f(x)|)=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 xf(Kn) converges to f(x). Then we will be done if xf(Kn) is a polynomial in x (the subscript reminding us that x controls the distribution of K). Indeed it is:

x[f(Kn)]=K=0nf(Kn)p(K)=K=0nf(Kn)bK,n(x)=Bn(f)(x)

Uniform convergence rates between functions

In the above proof, recall that convergence in each limit involving f depends on the uniform continuity of f, which implies a rate of convergence dependent on f 's modulus of continuity ω. It also depends on 'M', the absolute bound of the function, although this can be bypassed if one bounds ω 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:[10][6][11][12][13]

The following identities can be verified:

  1. k(nk)xk(1x)nk=1 ("probability")
  2. kkn(nk)xk(1x)nk=x ("mean")
  3. k(xkn)2(nk)xk(1x)nk=x(1x)n. ("variance")

In fact, by the binomial theorem

(1+t)n=k(nk)tk,

and this equation can be applied twice to tddt. The identities (1), (2), and (3) follow easily using the substitution t=x/(1x).

Within these three identities, use the above basis polynomial notation

bk,n(x)=(nk)xk(1x)nk,

and let

fn(x)=kf(k/n)bk,n(x).

Thus, by identity (1)

fn(x)f(x)=k[f(k/n)f(x)]bk,n(x),

so that

|fn(x)f(x)|k|f(k/n)f(x)|bk,n(x).

Since f is uniformly continuous, given ε>0, there is a δ>0 such that |f(a)f(b)|<ε whenever |ab|<δ. Moreover, by continuity, M=sup|f|<. But then

|fn(x)f(x)||xkn|<δ|f(k/n)f(x)|bk,n(x)+|xkn|δ|f(k/n)f(x)|bk,n(x).

The first sum is less than ε. On the other hand, by identity (3) above, and since |xk/n|δ, the second sum is bounded by 2M times

|xk/n|δbk,n(x)kδ2(xkn)2bk,n(x)=δ2x(1x)n<14δ2n1.
(Chebyshev's inequality)

It follows that the polynomials fn tend to f uniformly.

Generalizations to higher dimension

Bernstein polynomials can be generalized to Template:Math dimensions – the resulting polynomials have the form Template:Math.[1] In the simplest case only products of the unit interval Template:Math are considered; but, using affine transformations of the line, Bernstein polynomials can also be defined for products Template:Math. For a continuous function Template:Math on the Template:Math-fold product of the unit interval, the proof that Template:Math can be uniformly approximated by

i1i2ik(n1i1)(n2i2)(nkik)f(i1n1,i2n2,,iknk)x1i1(1x1)n1i1x2i2(1x2)n2i2xkik(1xk)nkik

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

See also

Notes

References