Find the ratio of a geometric series given a partial sum

170 Views Asked by At

How can I compute the ratio of a geometric series given a partial sum?
Basically solve for $r$: $$ S = \sum_{k = 0}^{n} a\,r^k = a \frac{1-r^{n+1}}{1-r}$$ given $S$, $a$ and $n$
I found this post, but it just reduces the problem to the case $a=1$, and doensn't provide a solution for this one.