Let r be the common ratio of the series where | r | < 1, a1 be the first term and an be the the nth term.
S = a1 + a2 + a3 + ... + an
\( r = \frac{a_2}{a_1} = \frac{a_3}{a_2}\)
S = a1 + r a1 + r2a1 + r3a1+... + rn-1a1
\(\frac{S}{a_1} = 1 + r + r^2 +r^3 + ... + r^{n-1}\)
\(\frac{rS}{a_1} = r + r^2 + r^3 +r^4 + ... + r^{n-1}+ r^{n}\)
\(\frac{rS}{a_1} =( \frac{S}{a_1} - 1)+ r^{n}\)
\(\frac{rS}{a_1} - \frac{S}{a_1} = r^{n} - 1 \)
\(\frac{rS-S}{a_1} = r^{n}\)-1
\(\frac{S(r-1)}{a_1} = r^{n}\)-1
\( S = a_1 \frac{r^{n}-1}{r-1}\)
OR
\( S = a_1 \frac{1-r^{n}}{1-r}\)