Simplifying a Geometric Series with Two Power Terms

geometric seriessequences-and-series

I have derived a geometric series below that I want to simplify but keep making a mess. Can anyone help?
$$s = aq^{n-1}r^{0} + aq^{n-2}r^{1} + \dotsb + aq^{1}r^{n-2} + aq^{0}r^{n-1}$$

I get the following, but I know it's wrong

$$s = \frac{aq^{n-1} – (ar^{n})/q}{1 – (r/q)}$$

Best Answer

Note that \begin{align} S & = aq^{n-1}r^{0} + aq^{n-2}r^{1} + \cdots + aq^{1}r^{n-2} + aq^{0}r^{n-1}\\ & = aq^{n-1}\left(1+\frac{r}{q}+ \cdots +\frac{r^{n-1}}{q^{n-1}}\right)\\ & = aq^{n-1} \frac{1-\frac{r^n}{q^n}}{1-\frac{r}{q}} \\ & = a\frac{q^n-r^n}{q-r}. \end{align}