Find the sum of $r + 2r^2 + 3r^3 + 4r^4 + \cdots$ Show answer
\begin{align*} r + 2r^2 + 3r^3 + 4r^4 + \cdots &= r + r^2 + r^3 + r^4 + \cdots\\ &\quad + r^2 + r^3 + r^4 + \cdots\\ &\quad + r^3 + r^4 + \cdots\\ &\quad + \cdots\\ &= \frac{r}{1-r} + \frac{r^2}{1-r} + \frac{r^3}{1-r} + \cdots\\ &= \frac{r}{1-r}\frac{1}{1-r}\\ &= \frac{r}{(1-r)^2} \end{align*}
Another solution: \begin{align*} S&= r + 2r^2 + 3r^3 + 4r^4 + \cdots\\ &= r + r^2 + r^3 + r^4 + \cdots\\ &\quad + r^2 + 2r^3 + 3r^4 + \cdots\\ &= \frac{r}{1-r} + rS\\ S-rS &= \frac{r}{1-r}\\ S &= \frac{r}{(1-r)^2} \end{align*}