I solved a problem to the point that I know the answer is
$\frac{2nr}{\tan\left( \frac{(n-2)\pi}{2n} \right)}$
The question tells me that the answer is going to be
$2rn\tan\left(\frac{\pi}{n}\right)$
Wolfram Alpha tells me the two are equal, so at least I'm on the right track. [link]
I was able to simplify
$\frac{2nr}{\tan\left( \frac{(n-2)\pi}{2n} \right)}$ to $\frac{2nr}{\tan\left( \frac{\pi}{2} - \frac{\pi}{n} \right)}$
and then attempted to use the tangent difference identify,
$\tan(\alpha \pm \beta) = \frac{\tan\alpha \pm \tan\beta}{1 \mp \tan\alpha\tan\beta}$
to simplify further.
But I am unable to find $\tan\alpha$ due to the fact that $\tan\left(\frac{\pi}{2}\right)$ is undefined. How do I work around this?
(Sorry if I went overboard with my LaTeX, I was really excited to be able to use it.)