Solving for $n$, given $\frac{R \sin\frac{180^\circ}{n}}{1 - \sin\frac{180^\circ}{n}} = r$ My A-Level algebra is failing me. Can someone please tell me how to rearrange this formula to give $n$ when you know $R$ and $r$.
$$\frac{R \sin\dfrac{180^\circ}{n}}{1 - \sin\dfrac{180^\circ}{n}} = r$$
This formula is devised here, and is a formula to find the radius 'r' of several smaller circles, that will fit around a larger circle of radius 'R'. I want to find out the number of circles that would fit if you know both the radii for a project I am working on. I know that there might be an issue here with fractions of a circle but that's OK for now.
I'm struggling with how to extract the 'n' out of the 'sin' function. Help much appreciated.
 A: First of all, get all the stuff you know on one side, and all the stuff you don't on the other: $\dfrac{\sin(180^\circ/n)}{1-\sin(180^\circ/n)} = \dfrac{r}{R}$
Now, for convenience I'm going to introduce a new variable, $t$, just to hold on to $\sin(180^\circ/n)$ - once we've got the expression written down in terms of $t$ we can 'unpack' it again.  This gives us $\dfrac{t}{1-t} = \dfrac{r}{R}$.  We can multiply both sides by $(1-t)$ and expand: $t = \dfrac{r}{R}(1-t) = \dfrac{r}{R}-t\dfrac{r}{R}$.  Now, add $t\dfrac{r}{R}$ to both sides, and factor out the factor of $t$ on the left: $t+t\dfrac{r}{R} = \dfrac{r}{R}$, or $t(1+\dfrac{r}{R}) = \dfrac{r}{R}$.  Divide out by the factor on the left, and then finally multiply numberator and denominator on the right by R to clear the fractions: $t=\dfrac{\frac{r}{R}}{1+\frac{r}{R}} = \dfrac{r}{R+r}$.  Now that we have an expression in terms of $t$, we can reintroduce our $n$: $\sin(180^\circ/n) = \dfrac{r}{R+r}$.  Now just apply arcsin to both sides and divide $180^\circ$ into both sides: $\dfrac{180^\circ}{n} = \arcsin\left(\dfrac{r}{R+r}\right)$, or finally:
$$n=\dfrac{180^\circ}{\arcsin\left(\dfrac{r}{R+r}\right)}$$
Also, one thing I strongly encourage doing whenever you're solving a problem like this: once you have what you think is the final formula, test it!  In this case, we know that six equally-sized circles will fit around a circle, so if we plug in $R=r$ we should find $n=6$:
$$\begin{align}
n &= \dfrac{180^\circ}{\arcsin\left(\dfrac{r}{R+r}\right)} \\
  &= \dfrac{180^\circ}{\arcsin\left(\dfrac{r}{r+r}\right)} \\
  &= \dfrac{180^\circ}{\arcsin\left(\dfrac{r}{2r}\right)} \\
  &= \dfrac{180^\circ}{\arcsin(\frac{1}{2})} \\
  &= \dfrac{180^\circ}{30^\circ} \\
  &= 6
\end{align}
$$
A: $$R \sin(180^\circ/n)/(1 - \sin(180^\circ/n)) = r$$
$$R/r  = (1 - \sin(180^\circ/n)) / \sin(180^\circ/n)$$
$$R/r  = 1 / \sin(180^\circ/n) -1$$
$$1 / \sin(180^\circ/n) = (r + R)/r $$
$$\sin(180^\circ/n) = r/(r + R) $$
$$ \text{etc.}$$
A: Rearranging gives $$\frac{r}{R}=\frac{\sin(180/n)}{1-\sin(180/n)}\\
\Rightarrow \frac{r(1-\sin(180/n)}{R}=\sin(180/n)\\
\Rightarrow \frac{r}{R}-\frac{r\sin(180/n)}{R}=\sin(180/n)\\
\Rightarrow \frac{r}{R}= \left(1+\frac{r}{R}\right)(\sin(180/n)\\
\Rightarrow \sin^{-1}\left(\frac{r}{R}\left(1+\frac{r}{R}\right)^{-1}\right)=(180/n)\\
\Rightarrow \frac{180}{\sin^{-1}\left(\frac{r}{R}\left(1+\frac{r}{R}\right)^{-1}\right)}^{-1}=n\\
\Rightarrow \frac{180}{\sin^{-1}\left(\frac{r}{R + r}\right)}=n$$
I hope that helps. You extract the value using the arcsine (inverse sine) function, which is on almost all scientific calculators.
