bernstein - Maple Programming Help

Home : Support : Online Help : Mathematics : Algebra : Polynomials : bernstein

bernstein

Bernstein polynomial approximating a function

 Calling Sequence bernstein(n, f, x)

Parameters

 n - integer f - function (specified as a procedure or operator) x - algebraic expression

Description

 • This procedure returns the nth degree Bernstein polynomial in x approximating the function f(x) on the interval $\left[0,1\right]$.  Note that f must be a function of one variable specified as a procedure or operator.
 • Bernstein polynomials arise in the Stone-Weierstrass approximation theorem of analysis that says any continuous function (R->R) can be uniformly approximated on a closed interval by a sequence of polynomials.  The Bernstein polynomials are one such set for doing this.
 • Given $p≔\left(n,i,x\right)→\mathrm{binomial}\left(n,i\right){x}^{i}{\left(1-x\right)}^{n-i}$ Bernstein is defined to be

$\mathrm{Bernstein}\left(n,f,x\right)=\sum _{i=0}^{n}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}p\left(n,i,x\right)f\left(\frac{i}{n}\right)$

Examples

 > $\mathrm{bernstein}\left(3,x→\frac{1}{x+1},z\right)$
 ${-}\frac{{1}}{{20}}{}{{z}}^{{3}}{+}\frac{{3}}{{10}}{}{{z}}^{{2}}{-}\frac{{3}}{{4}}{}{z}{+}{1}$ (1)
 > f := proc(t) if t < 1/2 then 4*t^2 else 2 - 4*t^2 end if end proc:
 > $\mathrm{bernstein}\left(2,f,x\right)$
 ${-}{4}{}{{x}}^{{2}}{+}{2}{}{x}$ (2)