Show that $\sum_{k=0}^{\infty}k^2x^k= \frac{x(1+x)}{(1-x)^3}$ for $0 < |x| < 1$ Show that $$\sum_{k=0}^{\infty}k^2x^k= \frac{x(1+x)}{(1-x)^3}$$ for $0 < |x| < 1$.
(This is appendix question A.1-3 from Introduction to Algorithms by Cormen)

To find the required sum you could just find the sum of the geometric progression $1,x,x^2,x^3,... \space where \space |x|\lt 1,$ and then double differentiate it .$$\sum_{k=0}^\infty x^k=\frac 1{1-x}\\=>\frac d{dx}\left(\sum_{k=0}^\infty x^k\right)=\frac d{dx}\left(\frac 1{1-x}\right)\\=>\sum_{k=0}^\infty kx^{k-1}=\frac 1{(1-x)^2}\\=>\sum_{k=0}^\infty kx^k=\frac x{(1-x)^2}\\=>\frac d{dx}\left(\sum_{k=0}^\infty kx^k\right)=\frac d{dx}\left(\frac x{(1-x)^2}\right)\\=>\sum_{k=0}^\infty k^2x^{k-1}=\frac{(1-x)^2+2(1-x)x}{(1-x)^4}\\=>\sum_{k=0}^\infty k^2x^{k-1}=\frac{1+x}{(1-x)^3}\\=>\sum_{k=0}^\infty k^2x^k=\frac {x(1+x)}{(1-x)^3}$$
