#### Question

Derivation of the formula for the sum of a geometric sequence

Derivation of the formula for the sum of a geometric sequence

The formula for sum of a geometric sequence can be derived from the formula for general terms of a geometric sequence.

Using the formula for the n^{th} term of a geometric sequence,

a_n = a_1r^{n-1}

in which a_1 is the first tirm, r is the common ratio.

a_1 = a_1r^0

a_2 = a_1r^1

a_3 = a_1r^2

\dots

\begin{aligned} S_n&=a_1+a_2+\dots+ a_n \\ &=a_1(1+r^1+r^2+\dots+r^{n-1}) \\ &= \dfrac{a_1(r-1)(1+r^1+r^2+\dots+r^{n-1})}{r-1} \\ &= \dfrac{a_1(r+r^2+\dots+r^n-1 -r-r^2-\dots-r^{n-1})}{r-1} \\ &= \dfrac{a_1(1-r^n)}{1-r} \end{aligned}

The sum of a geometric sequence is

S_n=a_1+a_2+\dots+a_{n-1}+ a_n

Using the formula for the n^{th} term of a geometric sequence,

a_n = a_1r^{n-1}

S_n=a_1+a_1r^1+a_1r^2+\dots+a_1r^{n-2}+a_1r^{n-1}

(1)

Multiply both sides of the equation by r

rS_n=a_1r+a_1r^2+a_1r^3+\dots+a_1r^{n-1}+a_1r^{n}

(2)

Subtract (2) from (1)

S_n-rS_n= a_1-a_1r^n

(1-r)S_n = a_1(1-r^n)

S_n=\dfrac{ a_1(1-r^n)}{1-r}