# Calculating areas of inner/outer circles as sides of middle shape increase

Given a square that encloses a circle, and a larger circle that encloses the square, it's easy to figure out the areas of both the inner and outer circles. If the square's sides are length 1, then the inner circle's diameter must be 1, and the outer circle's diameter must be $\sqrt{2}$. We now know enough to compute their areas.

But what if, instead of a square, the middle shape is a pentagon, or a hexagon, etc.?

Is there some way to compute how the areas of the circles change as the number of sides of the middle shape increases, aside from just manually calculating them?

This is a fun question, with a pretty cool answer: If the middle shape is a regular polygon with sides of length $\ell$, then the difference in circle areas is $\pi\ell^2/4$.
To see that this is the case, suppose the middle shape has $n$ sides and divide the shape into $n$ (congruent) isosceles triangles. These triangles meet at the center of the middle shape, where each has angle $2\pi/n$. Each side of the middle polygon serves as the base of one of these triangles. Let $h$ be the height of one of these triangles, so that the radius of the inner circle is $h$: $$R_{in}=h.$$ We can compute $h$ by dividing our isosceles triangle into two congruent right triangles. These triangles have one leg of length $h$ (for height, not hypotenuse) and one leg of length $\ell/2$. The angle opposite the leg of length $\ell/2$ is $(2\pi/n)/2=\pi/n$, so $$\tan(\pi/n) = (\ell/2)/h,$$ meaning that $h=\ell\cot(\pi/n)/2$, so $R_{in}=\ell\cot(\pi/n)/2$. Now the hypotenuse of our right triangle gives a radius of the outer circle, so $$R_{out} = \sqrt{(\ell/2)^2+h^2} = \sqrt{(\ell/4)+\ell^2\cot^2(\pi/n)/4} = \frac{\ell}{2}\sqrt{1+\cot^2(\pi/n)} = \ell\csc(\pi/n)/2.$$ Finally we can compute the difference in areas: $$\pi(R_{out}^2-R_{in}^2) = \frac{\pi\ell^2}{4}\left(\csc^2(\pi/n)-\cot^2(\pi/n)\right) = \frac{\pi\ell^2}{4}\frac{1-\cos^2(\pi/n)}{\sin^2(\pi/n)} = \frac{\pi\ell^2}{4}.$$