TITLE: How to calculate $\sum_{i=0}^{i=x}(1+r)^{x-i}$, where $c,x$ are constant
QUESTION [0 upvotes]: How to calculate $\sum_{i=0}^{i=x}c^{x-i}$, where $c,x$ are constant?

My real world example is suppose we want to calculate the total retirement savings over time where $x$ denotes years between now and retirement, $x-i$ denotes years until retirement, $r$ denotes the rate of return, and $M$ is your annual contribution. If we wanted to know how much savings we have at the end, then we would do the following:
$M(1+r)^x+M(1+r)^{x-1}+M(1+r)^{x-2} + \dots + M(1+r) + M= M\sum_{i=0}^{i=x}(1+r)^{x-i}$
How do I solve this?

REPLY [0 votes]: This is a partial sum of a geometric series.  From here:
$$\sum_{k=0}^{n-1}ar^k = a\frac{1-r^n}{1-r}.$$
Also note that
$$\sum_{k=0}^n ar^{n-k} = \sum_{k=0}^n ar^k.$$
Substituting for your case:
$$\sum_{i=0}^x c^{x-i} = \sum_{i=0}^x c^{i} = \frac{1-c^{x+1}}{1-c}.$$
You can multiply the right side by $M$ and replace $c$ with $1+r$ to solve the application problem:
$$\sum_{i=0}^x M(1+r)^{x-i} = M\sum_{i=0}^x (1+r)^{i} = M\frac{1-(1+r)^{x+1}}{1-(1+r)}.$$
{"set_name": "stack_exchange", "score": 0, "question_id": 1938824}