Finite weighted geometric sum (source code)

= Finite weighted geometric sum
{title2=$\sum_{n=1}^N nr^n=r[1-(N+1)r^N+Nr^{N+1}]/(1-r)^2$}

Differentiate the <finite geometric series> $\sum_{n=0}^Nr^n=(1-r^{N+1})/(1-r)$ with respect to $r$, then multiply by $r$. This proves the title identity for $r\ne1$ without any infinite-series differentiation. At $r=1$, the sum is $N(N+1)/2$. For $|r|<1$, both $Nr^N$ and $Nr^{N+1}$ tend to zero, yielding $\sum_{n=1}^\infty nr^n=r/(1-r)^2$.