<s>[INST] Property of Bernstein polynomial $\sum_{k=0}^n k^2 B_{n,k} (x) $ $= n(n-1)x^2+nx$ Actually, I have to show:
$$ \sum_{k=0}^n B_{n,k} (x) =1 $$
$$ \sum_{k=0}^n \frac{k}{n} B_{n,k} (x) =x $$
$$ \sum_{k=0}^n \frac{k^2}{n^2} B_{n,k} (x) =x^2+ \frac{1}{n}x(1-x) $$
So the first two claims were easy, but I failed to show the last one.
Remark: $B_{n,k}$ = $\frac{n!}{k!(n-k)!} x^k(1-x)^{n-k}$.
$ \sum_{k=0}^n \frac{k^2}{n^2} B_{n,k} (x) $ = $\frac{1}{n^2} \sum_{k=0}^n k^2 B_{n,k} (x) $ . Is there a trick for $\sum_{k=0}^n k^2 B_{n,k} (x) $ ? Found in another question that $\sum_{k=0}^nk^2B_{n,k}(x)=n(n-1)x^2+nx $, but why?
 [/INST] Evaluating the identity in the title we seek
$$\sum_{k=0}^n k^2 {n\choose k} x^k (1-x)^{n-k}.$$
This is a polyonomial of degree $n$ in $x$ from which we may
extract coefficients with $0\le q\le n$:
$$[x^q] \sum_{k=0}^n k^2 {n\choose k} x^k (1-x)^{n-k}
= \sum_{k=0}^q k^2 {n\choose k} [x^{q-k}] (1-x)^{n-k}
\\ = \sum_{k=0}^q k^2 {n\choose k} (-1)^{q-k} {n-k\choose q-k}
\\ = \sum_{k=2}^q k(k-1) {n\choose k} (-1)^{q-k} {n-k\choose q-k}
+ \sum_{k=1}^q k {n\choose k} (-1)^{q-k} {n-k\choose q-k}
\\ = n(n-1) \sum_{k=2}^q {n-2\choose k-2} (-1)^{q-k} {n-k\choose q-k}
+ n \sum_{k=1}^q {n-1\choose k-1} (-1)^{q-k} {n-k\choose q-k}.$$
We get for the first piece
$$n(n-1) \sum_{k=2}^q {n-2\choose k-2} (-1)^{q-k}
[z^{q-k}] (1+z)^{n-k}
\\ = n(n-1) [z^q] \sum_{k=2}^q {n-2\choose k-2} (-1)^{q-k}
z^k (1+z)^{n-k}.$$
Now here we may extend $k$ beyond $q$ as there is no contribution to
the coefficient extractor:
$$n(n-1) [z^q] \sum_{k=2}^n {n-2\choose k-2} (-1)^{q-k}
z^k (1+z)^{n-k}
\\ = n(n-1) [z^q] (-1)^q z^2 (1+z)^{n-2}
\sum_{k=2}^n {n-2\choose k-2} (-1)^{k-2}
z^{k-2} (1+z)^{-(k-2)}
\\ = n(n-1) [z^q] (-1)^q z^2 (1+z)^{n-2}
\left(1-\frac{z}{1+z}\right)^{n-2}
= n(n-1) [z^q] (-1)^q z^2.$$
This is $$n(n-1) \times [[q=2]].$$
We get for the second piece
$$n [z^q] \sum_{k=1}^n {n-1\choose k-1} (-1)^{q-k}
z^k (1+z)^{n-k}
\\ = - n [z^q] (-1)^q z (1+z)^{n-1}
\sum_{k=1}^n {n-1\choose k-1} (-1)^{k-1}
z^{k-1} (1+z)^{-(k-1)}
\\ = - n [z^q] (-1)^q z (1+z)^{n-1}
\left(1-\frac{z}{1+z}\right)^{n-1}
= - n [z^q] (-1)^q z.$$
This is $$n \times [[q=1]].$$
Collecting the two contributions we get
$$n(n-1)x^2 + nx$$ as claimed.
</s>