Calculating Bernstein polynomial for function $x^3$.

968 Views Asked by At

Let's calculate Bernstein polynomial for function $x^3$. $$S=\sum_{k=0}^n(\frac{k}{n})^3{n\choose k}x^k(1-x)^{n-k}=\sum_{k=1}^n(\frac{k}{n})^2{n-1\choose k-1}x^k(1-x)^{n-k}$$ Now let's split $(\frac{k}{n})^2$ using $(\frac{k}{n})^2=(\frac{k-1}{n-1})^2(\frac{n-1}{n})^2+\frac{2k}{n^2}-\frac{1}{n^2}$

$$S=\frac{(n-1)^2}{n^2}\sum_{k=1}^n\frac{(k-1)^2}{(n-1)^2}{n-1\choose k-1}x^k(1-x)^{n-k}+\frac{2}{n}(\frac{n-1}{n}x^2+\frac{x}{n})-\frac{x}{n^2}$$, because

$$\sum_{k=1}^n\frac{k}{n}{n-1\choose k-1}x^k(1-x)^{n-k}=\frac{n-1}{n}x^2+\frac{x}{n}$$ Hence:

$$S=\frac{(n-1)^2}{n^2}\sum_{k=2}^n\frac{(k-1)}{(n-1)}{n-2\choose k-2}x^k(1-x)^{n-k}+\frac{2}{n}(\frac{n-1}{n}x^2+\frac{x}{n})-\frac{x}{n^2}$$ Now using the same trick with splitting $\frac{k-1}{n-1}=\frac{k-2}{n-2}\frac{n-2}{n-1}+\frac{1}{n-1}$ $$S=\frac{(n-1)^2}{n^2}(\frac{n-2}{n-1}x^3\sum_{k=3}^n{n-3\choose k-3}x^{k-3}(1-x)^{n-k}+\frac{x^2}{n-1})+\frac{2}{n}(\frac{n-1}{n}x^2+\frac{x}{n})-\frac{x}{n^2}=\\=x^3\frac{(n-2)(n-1)}{n^2}+x^2\frac{3(n-1)}{n^2}+x\frac{1}{n^2}$$

It is OK!

1

There are 1 best solutions below

0
On BEST ANSWER

My way of computing it is that for any polynomial, you can express evaluation in the, in general needlessly complicated, form $$p(x)=\left.p(\partial_t)e^{tx}\right|_{t=0}$$ where $∂_t$ is the partial derivative for $t$, and the resulting expression is evaluated at $t=0$.

In the present case, this allows for a significant simplification, as the differential operator can be removed outside the sum \begin{align} S(x)&=(∂_t)^3\sum_{k=0}^n e^{t\frac kn}\binom nk x^k(1-x)^{n-k}\Bigg|_{t=0} \\ &=(∂_t)^3(e^{t/n}x+1-x)^n\Big|_{t=0} \\ &=(∂_t)^3\sum_{k=0}^n \binom nk (e^{t/n}-1)^kx^k\Bigg|_{t=0} \\ &=\left.(∂_t)^3\left[1+n \left(\frac tn+\frac{t^2}{2n^2}+\frac{t^3}{6n^3}\right)x+\binom n2\left(\frac tn+\frac{t^2}{2n^2}\right)^2x^2+\binom n3\left(\frac tn\right)^3x^3\right]\right|_{t=0} \\ &=n\frac{1}{n^3}x+\frac{n(n-1)}2\frac{6}{n^3}x^2+\frac{n(n-1)(n-2)}6\frac{6}{n^3}x^3 \\ &=x^3+\frac{x+3(n-1)x^2+(2-3n)x^3}{n^2}=x^3+\frac{3x^2(1-x)}{n}+\frac{x(1-x)(1-2x)}{n^2} \end{align} Note that in the expansion of $[(e^{t/n}-1)x+1]^n$ I left out any terms that are of order $t^4$ or higher, as their third derivative at $t=0$ is zero. This first applies to $(e^{t/n}-1)^4$ and higher, as $e^{t/n}-1=\frac tn(1+\frac{t}{2n}+...)$ has order $1$ in $t$.