Bernstein basis (source code)

= Bernstein basis
{c}
{title2=$b_{k,n}(x)=\binom nkx^k(1-x)^{n-k}$}

These $n+1$ nonnegative polynomials form a basis of polynomials of degree at most $n$, and sum to one on $[0,1]$. For $0\le j\le n$,
$$
x^j=\sum_{k=0}^n\frac{(k)_j}{(n)_j}b_{k,n}(x),
$$
where ratios for $j=0$ equal one and terms with $k<j$ vanish. The identity follows from $\binom nk(k)_j/(n)_j=\binom{n-j}{k-j}$ and the <binomial theorem>. It gives explicit basis coefficients using the <falling factorial>.