# How to show that for $|x|<1$, $1+2x+3x^2+\cdots=\frac1{(1-x)^2}$? [duplicate]

I saw this formula and I don't know if it has a certain name or how can it be proven

If $|x|<1$ then $$1+2x+3x^2+4x^3+\cdots= \frac{1}{(1-x)^2}$$

Can someone tell me anything about it? How can it be proven?

-

## marked as duplicate by David Mitra, Asaf Karagila, Davide Giraudo, Henry T. Horton, TMMFeb 18 '13 at 0:11

What's $n$ doing there? – Git Gud Feb 17 '13 at 23:03
Definitely untrue for certain values of $n$ and $x$ – Brian B Feb 17 '13 at 23:03
You mean $1+2x+\ldots+nx^{n-1}+\ldots$. Just take the derivative of $1+x+\ldots+x^n+\ldots=\frac{1}{1-x}$ and justify term-by-term differentiation. – 1015 Feb 17 '13 at 23:03
@BujancaMihai: See this Wikipedia page. – Zev Chonoles Feb 17 '13 at 23:10
Here is a similar question. – David Mitra Feb 17 '13 at 23:15

This is a power series: $$\sum_{n=0}^\infty(n+1) x^n$$

For power series we can integrate term by term and we have:

$$\int\left(\sum_{n=0}^\infty(n+1) x^n\right)dx = \sum_{n=0}^\infty\int (n+1)x^ndx = \sum_{n=0}^\infty x^{n+1} = \sum_{n=1}^\infty x^n = \frac x{1-x}$$

So if we differentiate $\frac{x}{1-x}$ with respect to $x$, and we get the sum of the original series:

$$\left(\frac x{1-x}\right)'=\frac1{1-x}+\frac{x}{(1-x)^2}=\frac1{(1-x)^2}$$

As wanted. Of course we have to have $|x|<1$ for everything to converge and have meaning.

-

If you know that $$1+x+x^2+x^3 + \cdots = \frac{1}{1-x}$$ then you can get this identity by differentiating both sides.

This raises a problem: Is the derivative of the sum equal to the sum of the derivatives even when there are infinitely many terms? In fact, in some cases it is not. However, it can be shown that for a power series (i.e. each term is a number times a different power of $x$) that does work.

That, however, is not the only way to do it.

-
Can you please give me an example (link or whatever) in which when you have infinite terms the derivative is not the sum of derivatives? – MyUserIsThis Feb 17 '13 at 23:17
Let $g_n(x)=\dfrac{\sin((n+1)x)}{\sqrt{n+1}} - \dfrac{\sin(nx)}{\sqrt{n}}$. Then $\dfrac{d}{dx} \sum_{n=1}^\infty g_n(x)=0$, but $\sum_{n=1}^\infty g_n'(x)\ne 0$. (In particular the latter at $x=0$ diverges to $\infty$ rather than converging to $0$.) – Michael Hardy Feb 17 '13 at 23:47
thank you, I didn't know any of those. – MyUserIsThis Feb 18 '13 at 19:05

Here is a solution which doesn't use integration or differentiation of power series.

I am going to use $$1+x+x^2+x^3 + \cdots +x^k= \frac{1-x^{k+1}}{1-x}$$

is well known and easy to prove. I will assume that you know it, but if you don't I can provide a proof.

Let $$S_k=1+2x+3x^2+..+(k+1)x^k$$ $$T_k=1+x+x^2+..+x^k$$

Then

$$S_k-T_k=x+2x^2+3x^3+..+kx^k=xS_{k-1}=x(S_k-(k+1)x^k )$$

Thus

$$S_k(x-1)=(k+1)x^{k+1}-T_k=(k+1)x^{k+1}-\frac{1-x^{k+1}}{1-x}$$

Thus

$$S_k= \frac{1}{(1-x)^2}+\frac{(k+1)x^{k+1}}{x-1}-\frac{x^{k+1}}{(x-1)^2}$$

Since $\lim_k (k+1)x^{k+1}=\lim_k x^{k+1} =0 \, \forall |x|<1$ you get the desired result.

-