Find $\sum\limits_{n=1}^{\infty}\frac{n^2}{2^n}$ using the function $f(x)=\frac{1+x}{(1-x)^3}$ Find $\sum\limits_{n=1}^{\infty}\frac{n^2}{2^n}$ using the function $f(x)=\frac{1+x}{(1-x)^3}$
Power series representation of $f(x)$ is $\sum\limits_{n=1}^{\infty}n^2x^{n-1}$.
Question: Why is $\sum\limits_{n=1}^{\infty}\frac{n^2}{2^n}=\frac{1}{2}f\left(\frac{1}{2}\right)$? Doesn't it has to be $f\left(\frac{1}{2}\right)$?

It sometimes helps to carefully write out the first few terms:
$$f(x)=\sum_{n=1}^\infty n^2x^{n-1}=1^2x^0+2^2x^1+3^2x^2+\cdots=1+4x+9x^2+\cdots$$
while
$$\sum_{n=1}^\infty{n^2\over2^n}={1\over2}+{4\over2^2}+{9\over2^3}+\cdots={1\over2}\left(1+{4\over2}+{9\over2^2}+\cdots\right)$$
