Bernstein Polynomial

Author

Eric W. Weisstein
February 1, 2009

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SpecialFunctions/BernsteinPolynomial.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/BernsteinPolynomial.html.

©2009 Wolfram Research, Inc. except for portions noted otherwise

Code

BernsteinB[0,n_,0]:=1
BernsteinB[n_,n_,t_]:=t^n
BernsteinB[i_,n_,t_]:=Binomial[n,i]t^i(1-t)^(n-i)

Plots

Show[GraphicsArray[Partition[Table[Plot[Evaluate[Table[BernsteinB[i,n,t],{i,0,n}],{t,0,1},
AxesLabel->TraditionalForm/@{t,Subscript[B,Sequence[i,n]][t]},
Ticks->{Range[0,1,.5],Range[0,1,.5]},
PlotRange->{{-.1,1.1},{-.1,1.1}},
PlotStyle->{Black,Red,Yellow,Green,Blue,Violet},
DisplayFunction->Identity]],{n,0,6}],3]
]]

Enumeration

Flatten[Table[{Subscript[B,Sequence[i,n]][t],BernsteinB[i,n,t]},{n,0,3},{i,0,n}],1]//ColumnForm//TraditionalForm

Table[BernsteinBasis[n,i,t],{n,0,3},{i,0,n}]//FunctionExpand

FunctionExpand[BernsteinBasis[1,0,t]]

FunctionExpand[BernsteinBasis[1,0,t],0<t<1]

BernsteinB[0,1,t]

FullSimplify[BernsteinBasis[1,0,t]-BernsteinB[0,1,t],0<t<1]

Plot[BernsteinBasis[1,0,t]-BernsteinB[0,1,t],{t,0,1},PlotStyle->{Thickness[.02],Red}]

Identities

(BernsteinBasis[n, i, t])==(t^i) (Binomial[n, i]) (((1-t))^(n-i))

FullSimplify[Binomial[n,i](t^i)(((1-t))^(n-i))-BernsteinBasis[n,i,t],0<t<1]

PiecewiseExpand[BernsteinBasis[n,i,t],0<t<1]

FunctionExpand[BernsteinBasis[n,i,t],0<t<1]

FunctionExpand[BernsteinBasis[n,i,t],0<t<1&&!(i==0&&n==0)]

(BernsteinBasis[n, i, t])==(BernsteinBasis[n, n-i, 1-t])

FullSimplify[BernsteinB[i,n,t]-BernsteinB[n-i,n,1-t]]

FullSimplify[BernsteinBasis[n,i,t]-BernsteinBasis[n,n-i,1-t]]

FullSimplify[BernsteinBasis[n,i,t]-BernsteinBasis[n,n-i,1-t],0<t<1]

Table[BernsteinBasis[n,i,t]-BernsteinBasis[n,n-i,1-t]/.{t->RandomReal[],i->RandomInteger[{0,10}],n->RandomInteger[{0,10}]},{10^3}]//Chop//Union

Sums

(∑_(i=0)^n)(BernsteinBasis[n, i, t])==1

Sum[BernsteinB[i,n,t],{i,0,n}]

Sum[BernsteinBasis[n,i,t],{i,0,n}]

Extrema

MaxValue[BernsteinBasis[n,i,t],t]

Subtract@@@Table[{If[n==i,1,(i^i)(n^(-n))(((n-i))^(n-i))]Binomial[n,i],MaxValue[BernsteinBasis[n,i,t],t]}/.{n->RandomInteger[{1,20}],i->RandomInteger[{1,20}]},{100}]//Chop//Union

Properties

Extreme values

Table[BernsteinB[i,n,0],{n,0,5},{i,n-1}]

Table[BernsteinB[0,n,0],{n,5}]

Table[BernsteinB[n,n,1],{n,5}]

Table[BernsteinB[0,n,1],{n,5}]

Table[BernsteinB[n,n,0],{n,5}]

Symmetry

Table[BernsteinB[i,n,t]-BernsteinB[n-i,n,1-t],{n,0,5},{i,n}]

Positivity

Bernstein[i,n,t]≥0

FullSimplify[BernsteinBasis[n,i,t]≥0,t∈Reals]

Normalization

Table[Sum[BernsteinB[i,n,t],{i,0,n}],{n,10}]//Simplify

Maximum

Simplify[D[Bernstein[i,n,t],t]]

FullSimplify[BernsteinB[i,n,i/n],{0≤i≤n}]

(i^i) (n^(-n)) (((-i+n))^(-i+n)) Binomial[n,i]/.{i->1,n->3}

Envelope

Factor[FullSimplify[Limit[Sqrt[n] (Binomial[n,k] x^k (1-x)^(n-k)/.k->x n)/.Binomial[n_,k_]:>n!/((n-k)! k!)/.y_!->(Normal[Series[y!,{y,Infinity,1}]]),n->Infinity],x>0]]

With[{n=20},
Plot[Evaluate[Flatten[{
1/Sqrt[t(1-t)]/ Sqrt[2Pi n],
Table[BernsteinB[i,n,t],{i,0,n}]
}]],
{t,0,1},
PlotRange->{{-.1,1.1},{0,1}},
PlotStyle->{{Thickness[.01],Red},Sequence@@Table[Black,{n+1}]},
AxesLabel->TraditionalForm/@{x,"(Subscript[B, i, n])(\!\(\*
StyleBox[\"x\",\nFontSlant->\"Italic\"]\))"}
]
]