<s>[INST] Sum of a power series $n x^n$ I would like to know:
How come that
$$\sum_{n=1}^\infty n x^n=\frac{x}{(x-1)^2}$$
Why isn't it infinity?
 [/INST] Using the ratio test, $\dfrac{a_{n+1}}{a_n} = \dfrac{(n+1)x^{n+1}}{nx^n} = \dfrac{(n+1)x}{n}$.  So, the series converges when $|x|<1$.
$$F(x) = \sum_{n=1}^\infty n x^n = x + 2x^2 + 3x^3 + ...$$
$$xF(x) = \sum_{n=1}^\infty n x^{n+1} = x^2 + 2x^3 + 3x^4 + ...$$
$$F(x) - xF(x) = x + x^2 + x^3 + x^4... = \sum_{n=1}^\infty x^n = \dfrac{x}{1 - x}$$
It's a geometric series, defined when $|x| < 1$.
$$F(x)(1 - x)  = \dfrac{x}{1-x}$$
$$F(x) = \dfrac{x}{(1-x)^2}$$
</s>