I suppose several of you know some fancy ways to establish the formula for the sum of the first $n$ terms of the geometric series $$1+x+x^{2}+x^{3}+ \ldots $$
Can you share below some of your fave ways to sum the first $n$ terms of the series $$ 1 + 2x+ 3x^{2} + \ldots $$
Naturally, for $x \neq 1$, one way to attain the goal is to take the derivative of both sides of $$\sum_{k=0}^{n-1} x^{k} = \frac{x^{n}-1}{x-1}.$$
Another possibility is to apply something that the authors of certain handbook of discrete and combinatorial math called "the perturbation method": if $S(n):= \sum_{k=1}^{n} kx^{k-1}$, then
$$ S(n) + (n+1)x^{n} = 1 + \sum_{k=2}^{n+1} kx^{k-1}$$
which can be rewritten as
$$ S(n) + (n+1)x^{n} = 1 + \sum_{k=1}^{n}(k+1)x^{k}.$$
Thus,
$$ (1-x)S(n) = \frac{x(x^{n}-1)}{x-1} + 1 - (n+1)x^{n}$$
or
$$S(n) = \frac{nx^{n+1}-(n+1)x^{n}+1}{(x-1)^{2}}.$$
What other cool ways to sum $1+2x+ \cdots + nx^{n-1}$ do you know or have heard of? Have you ever seen a "proof without words" of the result in question?
Thanks in advance for your attention.
$1 + 2x + 3x^2 + \cdots + nx^{n-1}$
= $1 + x + x^2 + \cdots + x^{n-1} $
$+ x + x^2 + \cdots + x^{n-1} $
$+ x^2 + \cdots + x^{n-1} $
$+ \cdots + x^{n-1}$
$= \dfrac{x^n-1}{x-1}$
$+\dfrac{x^n-x}{x-1}$
$+\dfrac{x^n-x^2}{x-1}$
$+\cdots + \dfrac{x^{n}-x^{n-1}}{x-1}$
$=\dfrac{nx^n-(1+x+x^2+\cdots+x^{n-1})}{x-1}$
$=\dfrac{nx^n-\dfrac{x^n-1}{x-1}}{x-1}$