Consider a convex polygon with $n$ sides inscribed in a circle. We denote $P$ its perimeter and $e^{ia_1},\ldots, e^{ia_n}$ its vertices with $0<a_1<a_2<\ldots<2\pi$.
Show that this polygon perimeter equation holds.
I understand how to do this for a regular polygon (drawing a line from the center of the circle to each vertex and then calculating the circumference from the side length of each triangle), but how would you do this with a convex polygon?