# Prove the identity $\sum\limits_{k=0}^n\left(x-\frac{k}{n}\right)^2 \binom{n}{k}x^k(1-x)^{n-k}=\frac{1}{n}x(1-x)$ for $0 \leq x \leq 1$

I'd like to prove this identity:

$$\sum_{k=0}^n\left(x-\frac{k}{n}\right)^2 \binom{n}{k}x^k(1-x)^{n-k}=\frac{1}{n}x(1-x)$$ for $x\in[0,1]$ and $n\in\mathbb{N}$.

I've worked on this problem for the last few hours without success. I have tried induction and I have tried re-writing the expression as many ways as I could think of. Any help would be greatly appreciated. Thanks.

• You can find this identity proved in Ross Elementary calculus book. I think this identity is used for proving Weirstrass Approximation theorem, via Bernstein Polynomials – crskhr Dec 8 '15 at 6:21
• duplicate of math.stackexchange.com/q/463996 – Jean Marie Mar 14 '20 at 5:51

Brute force approach. There might be a more elegant approach.

Multiply by $$n^2$$, and you want:

$$\sum_{k=0}^n\left(nx-k\right)^2 \binom{n}{k}x^k(1-x)^{n-k}=nx(1-x)$$

First part: $$\sum_{k=0}^n n^2x^2\binom{n}{k}x^k(1-x)^{n-k} = n^2x^2(x+(1-x))^n = n^2x^2.\tag{1}$$

Second part: \begin{align} \sum_{k=0}^n 2nkx \binom{n}{k}x^ky^{n-k} &= 2nx^2\sum_{k=0}^n k\binom{n}{k}x^{k-1}y^{n-k}\\ &=2nx^2\frac{d}{dx}(x+y)^n \\ &= 2nx^2n(x+y)^{n-1}\end{align}

Letting $$y=1-x$$, then we get:

$$\sum_{k=0}^n 2nkx \binom{n}{k}x^k(1-x)^{n-k} = 2n^2x^2\tag{2}$$

Part 3:

\begin{align} \sum k^2\binom{n}{k}x^ky^{n-k} &= x\frac{d}{dx}\sum_{k=0}^nk\binom{n}{k}x^ky^{n-k}\\ &=\left(x\frac{d}{dx}\right)^2(x+y)^n\\ &=x\frac{d}{dx}\left(xn(x+y)^{n-1}\right)\\ &=x\left(n(x+y)^{n-1} + xn(n-1)(x+y)^{n-2}\right)\\ \end{align}

Letting $$y=1-x$$ we have:

$$\sum k^2\binom{n}{k}x^ky^{n-k}=xn + n(n-1)x^2\tag{3}$$

Computing $$(1)-(2)+(3)$$ we get:

$$\sum_{k=0}^n\left(nx-k\right)^2 \binom{n}{k}x^k(1-x)^k=n^2x^2-2n^2x^2+n(n-1)x^2 + nx=nx-nx^2=nx(1-x)$$

A more algebraic way might amount to noting that:

$$\sum_{k=0}^n ((n-k)x -ky)^2\binom{n}{k}x^ky^{n-k}$$

is a symmetric polynomial in $$x,y$$, and thus can be written in terms of $$x+y,xy$$. Not sure where to go from there, however.