<s>[INST] Geometrical series extra term confusion Given
$$
P = \frac{A}{1+x} + \frac{A}{(1+x)^2} + \dots + \frac{A}{(1+x)^{N-1}} + \frac{A}{(1+x)^{N}},
$$
how can I arrive at the textbook's expression
$$
P = A\left( \frac{1 - \frac{1}{(1+x)^N}}{x}\right)
$$
Attempt at solution
This seems like a divergent geometrical series, I know that the partial sum
$$
S_n = \frac{1-r^N}{1 - r},
$$
where $r$ is the common ratio $1 / (1+x)$, but when I write down $S_n$, I find an extra $1+x$ factor
$$
P = A\frac{S_n}{1+x}.
$$
It led me to think that maybe because in the definition of $S_n$ for an infinite geometrical series we start at $x^0$, i.e.,  $a + ax + ax^2 + \dots$, and in this problem we start at $ax + ax^2 + \dots$, then there is some term missing around, but I can't seem to make it work.
Can anyone point out what I am missing ?
 [/INST] $ P = \frac{A}{1+x} + \frac{A}{(1+x)^2} + \dots + \frac{A}{(1+x)^{N-1}} + \frac{A}{(1+x)^{N}}$
$=\frac{A}{1+x}(1 + \frac{A}{1+x} + \frac{A}{(1+x)^2} + \dots + \frac{A}{(1+x)^{N-2}} + \frac{A}{(1+x)^{N-1}})$
$=\frac{A}{1+x}(\frac{1-\frac{1}{(1+x)^N}}{1-\frac{1}{1+x}})$
$= \frac{A}{1+x}(\frac{1-\frac{1}{(1+x)^N}}{\frac{x}{1+x}})$
$=A(\frac{1-\frac{1}{(1+x)^N}}{x})$
</s>