How can I prove $$\sum_{k=1}^\infty kq^{k-1}=\frac{1}{(1-q)^2}$$?
I know that the formula to do the summation of a number $a$ is $a(a+1)/2$. And I also know that the summation of a geometric series $ar^n$ is $a/(1-r)$.
But I don't know how to solve my problem.
We have
$$\frac{1}{1-q}=1+q+q^2+\dots$$
The sequence you have is then
$1+q+q^2+q^3+\dots$
$\;\;\;\;+q+q^2+q^3+\dots$
$\;\;\;\;\;\;\;\;\;\;\;+q^2+q^3+\dots$
which equals
$$(1+q+q^2+\dots)+q(1+q+q^2+\dots)+q^2(1+q+q^2+\dots)+\dots$$
$$=(1+q+q^2+\dots)(1+q+q^2+\dots)$$
$$=\dfrac{1}{(1-q)^2}$$