# How to find the sum of the following series

How can I find the sum of the following series? $$\sum_{n=0}^{+\infty}\frac{n^2}{2^n}$$ I know that it converges, and Wolfram Alpha tells me that its sum is 6 .

Which technique should I use to prove that the sum is 6?

-
If this is homework, tag it as such. –  lhf Feb 4 '11 at 16:56
What series that is similar to that one do you know? –  lhf Feb 4 '11 at 16:56
No, it isn't. I found it in a math joke, without explanation, and I was trying to find out the result. –  zar Feb 4 '11 at 21:48

It is equal to $f(x)=\sum_{n \geq 0} n^2 x^n$ evaluated at $x=1/2$. To compute this function of $x$, write $n^2 = (n+1)(n+2)-3(n+1)+1$, so that $f(x)=a(x)+b(x)+c(x)$ with:

$a(x)= \sum_{n \geq 0} (n+1)(n+2) x^n = \frac{d^2}{dx^2} \left( \sum_{n \geq 0} x^n\right) = \frac{2}{(1-x)^3}$

$b(x)=\sum_{n \geq 0} 3 (n+1) x^n = 3\frac{d}{dx} \left( \sum_{n \geq 0} x^n \right) = \frac{3}{(1-x)^2}$

$c(x)= \sum_{n \geq 0} x^n = \frac{1}{1-x}$

So $f(1/2)=\frac{2}{(1/2)^3}-\frac{3}{(1/2)^2} + \frac{1}{1/2} = 16-12+2=6$.

The "technique" is to add a parameter in the series, to make the multiplication by $n+1$ appear as differentiation.

-
I think that $\sum_{n\ge0}(n+1)(n+2)x^n$ should be equal to $\frac{d^2}{dx^2}\sum_{n\ge0}x^{n+2}$, right? (The second derivative is the same, anyway) –  zar Feb 4 '11 at 19:12
+1 for presenting it as an example of a general technique, rather than a trick that would appear to work only for this case. Another general technique, which is probably equivalent to yours, would be as follows. Write the similar-looking indefinite integral $\int x^2 2^{-x} dx$. Integrate it by parts. Note that the result has the form $2^{-x}P(x)$, where $P$ is a polynomial. Conjecture that the partial sum in the discrete case has the form $S_n=2^{-n}P(n)$. Write $S_n-S_{n-1}=n^22^{-n}$, and determine $P$. –  Ben Crowell Jan 30 '12 at 17:12

You can also apply the formula for the sum of a geometric series three times in a row :

$$\begin{array}{rcl} \sum_{n=1}^\infty \frac{n^2}{2^n} &=& \sum_{n=1}^\infty (2n-1) \sum_{k=n}^\infty \frac{1}{2^k} = \sum_{n=1}^\infty \frac{2n-1}{2^{n-1}} \\ &=& \sum_{k=0}^\infty \frac{1}{2^k} + \sum_{n=1}^\infty 2 \sum_{k=n}^\infty \frac{1}{2^k} \\ &=& 2 + \sum_{n=1}^\infty \frac{2}{2^{n-1}} \\ &= & 2 + 2 \cdot 2 = 6 \end{array}$$

Also, if cutting up those geometric series is too hard, there is an easier way to do the same thing :

$$\begin{array}{rcl} (1-\frac{1}{2})^3 \cdot \sum_{n=1}^\infty \frac{n^2}{2^n} & = & (1-\frac{1}{2})^2 \cdot \sum_{n=1}^\infty \frac{n^2-(n-1)^2}{2^n} = (1-\frac{1}{2})^2 \cdot \sum_{n=1}^\infty \frac{2n-1}{2^n} \\ &=& (1-\frac{1}{2}) \cdot \left(\frac{1}{2} + \sum_{n=2}^\infty \frac{(2n-1)-(2n-3)}{2^n} \right) \\ &=& (1-\frac{1}{2}) \cdot \left(\frac{1}{2} + \sum_{n=2}^\infty \frac{2}{2^n} \right) \\ &=& \frac{1}{4} + \frac{2}{4} = \frac{3}{4} = \left(1-\frac{1}{2} \right)^3 \cdot 6 \end{array}$$

-
This is the only answer I've seen so far that doesn't use calculus. That makes it a good answer, since the OP tagged it as "algebra precalculus," presumably indicating that s/he doesn't know calculus. –  Ben Crowell Jan 30 '12 at 21:25

For $x$ in a neighborhood of $1$, let $$f(x) = \sum\limits_{n = 0}^\infty {\frac{{x^n }}{{2^n }}} = \sum\limits_{n = 0}^\infty {\bigg(\frac{x}{2}\bigg)^n } = \frac{1}{{1 - x/2}} = \frac{2}{{2 - x}}.$$ Thus, on the one hand, $$f'(x) = \sum\limits_{n = 0}^\infty {\frac{{nx^{n - 1} }}{{2^n }}} \;\; {\rm and} \;\; f''(x) = \sum\limits_{n = 0}^\infty {\frac{{n(n - 1)x^{n - 2} }}{{2^n }}} ,$$ and, on the other hand, $$f'(x) = \frac{2}{{(2 - x)^2 }} \;\; {\rm and} \;\; f''(x) = \frac{4}{{(2 - x)^3 }}.$$ Hence, $$f'(1) = \sum\limits_{n = 0}^\infty {\frac{n}{{2^n }}} = 2 \;\; {\rm and} \;\; f''(1) = \sum\limits_{n = 0}^\infty {\frac{{n(n - 1)}}{{2^n }}} = 4.$$ Finally, $$\sum\limits_{n = 0}^\infty {\frac{{n^2 }}{{2^n }}} = f'(1) + f''(1) = 6.$$ The idea here was to consider the Probability-generating function of the geometric$(1/2)$ distribution.

-