What I'm attempting to do is to rearrange the formula for the sum of a geometric series so as to find the value of its common ratio $r$. I've tried several different methods, all of which have failed; though I can't understand why.
This was my last attempt using logarithms:
$$ S_n=\frac{a(1-r^n)}{1-r}$$ $$S_n(1-r) = a(1-r^n)$$ $$S_n-S_nr = a - ar^n$$ $$\frac{S_n}{a}-1 = \frac{S_n}{a}r-r^n$$ $$\log{\frac{S_n}{a}} = \log{\frac{S_n}{a}}+\log{r}-n\log{r}$$ $$0 = (\log{r})(n-1)$$ $$r = 10^{\frac{0}{n-1}}$$ $$r=1$$
I can't understand where I'm going wrong. Any advice would be great. Also, if you know a formula to find $r$ using $S_n$ and $a$, then that would be equally fantastic.
Thanks.