<s>[INST] Prove geometric sequence question Prove that $x+2x^2+3x^3+4x^4+...+nx^n = \frac{nx^{n+2}-(n+1)x^{n+1}+x}{(x-1)^2}$
I see that this can be written as $$\sum_{n=1}^n nx^n = n\sum_{n=1}^n x^n$$
$$\sum_{n=1}^n x^n = \frac{x(x^n-1)}{(x-1)}$$
$$\therefore n\sum_{n=1}^n x^n = n(\frac{x(x^n-1)}{(x-1)})$$
Following this I squared top and bottom so the denominator would be the same as that n the question. But I cannot seem to show the top as that in the question.
Can I have a hint on how to proceed? Also in the 1 line, is there a proof of the fact that a constant can be taken out of the summation?
Thanks
 [/INST] Multiply $x + 2x^2 + 3x^3 + 4x^4+...+nx^n$ with $x-1$. You'll get:
$$(x + 2x^2 + 3x^3 + 4x^4+...+nx^n)(x-1) = x(x + 2x^2 + 3x^3 + 4x^4+...+nx^n) - (x + 2x^2 + 3x^3 + 4x^4+...+nx^n)$$
Expand it and you'll obviously end up with sort of telescopic series. Every number in the first term, except the last one will be of the form $nx^{n+1}$ and will have a "companion" of the second term of the form $(n+1)x^{n+1}$. So their difference will be $-x^{n-1}$. As we said the last of the first term and the first term of the second sequence will be "alone" and you'll end up with:
$$nx^{n+1} - x^{n-1} -...-x^2 - x$$
Now multiply again with $x-1$, so we'll have:
$$(nx^{n+1} - x^{n-1} -...-x^2 - x)(x-1) = nx^{n+1}(n-1) - (x^{n-1} +...-x^2 + x)(x-1)$$
Expand the first term. The second term is well know identity and is equal to $x^n - x$, anyway you can prove that using the same telescoping method we used previously. So we have:
$$nx^{n+2} - nx^{n-1} - x^n + x = nx^{n+2} - (n+1)x^{n+1} + x$$
Q.E.D.
Note that if the initial LHS was infinite the we could have written as:
$$\frac{1}{(x-1)^2} - 1$$
Using the formula:
$$\frac{1}{(1-x)^{k+1}} = \sum_{n=0}^{\infty} \binom{n+k}{n}x^n$$
But because it's finite series we have to add something instead of the 1 to make that boundary. Simular as we make $1 + x + x^2 + x^3 + x^4+... = \frac{1}{x-1}$ bounded with:
$1 + x + x^2 + x^3+...+x^{n-1} = \frac{x^n - 1}{x-1}$
</s>