### Method NO. 1 : Upseting Method, The sum of a geometric sequence

22Dec07

Asume that we want to calculate
$S_n = \sum_{\substack{0 \leq k \leq n}}ax^k$
Of course, $S_n +ax^{n+1} = ax^0 + \sum_{\substack{0 \leq k \leq n}}ax^{k+1}$
But the sum on the right side is equal to $x \sum_{\substack{0 \leq k \leq n}}ax^k = xS_n$ Therefore $S_n + ax^{n+1} = a + xS_n$ and so, $S_n = \sum_{\substack{0 \leq k \leq n}}ax^k = \frac{a-ax^{n+1}}{1-x}$