## Solution

We have

$$\frac{1}{(1-x)^2} = \sum_{k=0}^\infty (k+1)x^k$$

Multiplying by $x^2$ on both sides we get

\begin{aligned} \frac{x^2}{(1-x)^2} &= \sum_{k=0}^\infty (k+1)x^{k+2} \\ \end{aligned}

Substituting $x= \frac{1}{2}$ in the above identity, we get

\begin{aligned} \sum_{k=0}^\infty \frac{k}{2^{k+1}} = 1 \end{aligned}

Differentiating and mutliplying the equation below by $x^2$

$$\frac{x}{(1-x)^2} = \sum_{k=0}^\infty (k+1)x^{k+1}$$

we get

$$\sum_{k=0}^\infty (k+1)^2 x^{k+2} = \frac{x^2(x+1)}{(1-x)^3}$$

Substituting $x= \frac{1}{2}$ in the above identity, we get

\begin{aligned} \sum_{k=0}^\infty \frac{k^2}{2^{k+1}} = 3 \end{aligned}

The last two identities can be obtained using the same approach as above.

All the identities below are a generalization of the above identities