# Rearrange the formula for the sum of a geometric series to find the value of its common ratio?

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.

-
There is a mistake in the application of log to $(\dfrac{S_n}{a}-1).$ –  Américo Tavares Oct 31 '10 at 23:04
Do you want the sum of the (infinite) geometric series, or do you want the $n$th partial sum of the series? Your question implies the former, but the formula you give for $S_n$ implies the latter. –  Mike Spivey Nov 1 '10 at 2:17

HINT $\ \$ Consider $\ S_{n+1} - r\ S_n$
$$S_{n+1} - rS_n = a$$ (by def. of geometric series)