1

Compute the value of $$\sum_{n=1}^\infty n^2x^n$$

whenever the series is convergent. I used the ratio test to determine that the series is convergent at $|x|<1$. I used Wolfram Alpha to compute the value and it gave me this $$\sum_{n=1}^\infty n^2x^n = \frac{-x(x+1)}{(x-1)^3}$$

How did Wolfram Alpha get this answer?

2 Answers2

0

Note that

$$\left(x\frac{d}{dx}\right)^2\sum_{n=1}^\infty x^n=\sum_{n=1}^\infty n^2x^n$$

Mark Viola
  • 179,405
  • Please let me know how I can improve this answer too. As always, I really want to give you the best answer I can. If the answer was not useful, I am happy to delete it. -Mark – Mark Viola Apr 12 '17 at 17:11
0

The radius of convergence of the given power series is clearly one and $$ \sum_{n\geq 0} x^n e^{-nz} = \frac{1}{1- xe^{-z}} \tag{1} $$ leads to $$ \sum_{n\geq 0} x^n n^2 e^{-nz} = \frac{d^2}{dz^2}\frac{1}{1- xe^{-z}} = \frac{e^z x \left(e^z+x\right)}{\left(e^z-x\right)^3}\tag{2} $$ and by evaluating both sides of $(2)$ at $z=0$ we get $$ \sum_{n\geq 0} n^2 x^n = \frac{x(x+1)}{(1-x)^3} \tag{3} $$ as wanted. More generally, if $p(n)$ is a polynomial with degree $d$, $$ \sum_{n\geq 0} p(n)\,x^n = \frac{q(x)}{(1-x)^{d+1}}\tag{4} $$ where $q(x)$ is a polynomial with degree $\leq d$, whose coefficient can be computed by interpolation.

Jack D'Aurizio
  • 353,855