A regular polygon has all sides equal a. Each side is observed from the center O at the same angle phi. The polygon area is covered by as many isosceles triangles with vertices centered, as sides it has. A regular polygon has a circumscribed circle with radius r. Considering now the radius r as the side of isosceles triangle with vertice at the center and a as third side we have the area s
s = 1/2a r cos(phi/2)
if we have n sides then phi=(2pi)/n
and the polygon area is given by
S = n s = (nar)/2cos(pi/n)
but a = 2rsin(phi/2)=2rsin(pi/n)
now substituting r = a/(2sin(pi/n)) into the S relationship
S=(n a^2)/4cot(pi/n)