# Two generating functions involving binomial coefficients

Are any of you familiar with the closed form solutions for $\sum_{k=0}^{n} k C(n,k) x^k$ and $\sum_{k=0}^{n} k^2 C(n,k) x^k$ where $0 < x < 1$?

Thanks!

-
The answer is yes. :-) More seriously, what do you know and what have you tried? – Did Jun 8 '11 at 16:26
Differentiate the binomial theorem. – Qiaochu Yuan Jun 8 '11 at 16:35

As Qiaochu mentions, one solution is obtained by differentiation the binomial formula. Specifically since $$(1+x)^{n}=\sum_{k=0}^{n}\binom{n}{k}x^{k}$$ differentiation with respect to $x$ yields and multiplication by $x$ tells us that $$nx(1+x)^{n-1}=\sum_{k=0}^{n}\binom{n}{k}kx^{k}.$$ Here is an alternative: Lets rearrange $$\sum_{k=0}^{n}\binom{n}{k}kx^{k}=\sum_{k=1}^{n}\frac{n!}{(k-1)!(n-k)!}x^{k}$$ Now, with the goal of recovering the binomial formula, lets pull out $nx$, because then we get $$=nx\sum_{k=1}^{n}\frac{(n-1)!}{(k-1)!(n-k)!}x^{k-1}=nx\sum_{k=0}^{n-1}\binom{n-1}{k}x^{k}=nx(1+x)^{n-1}.$$
I leave the case with $k^2$ to you, it is very similar.