finding diameter of circumscribed circle of an irregular polygon I have a real world problem of trying to find the diameter of a the circumscribed circle of a irregular cyclic polygon as shown in the diagram.
I frequently have to draw layouts for cattle handling facilities out of fixed (but differing) length components and wish to lay them out on perfect circles.
I can work it out using CAD software but it would be really handy if i could use an excel formula or calculator to just do it mathematically. Such a formula has eluded me till now.

 A: Well, not so much a formula, but it can be written as a root of a function. If you like using degrees: suppose you have $m$ sides with length $A,$ then $n$ sides with length $B.$ Then you need to find the radius $r$ such that
$$ m \arccos \left( 1 - \frac{A^2}{2 r^2} \right) + n \arccos \left( 1 - \frac{B^2}{2 r^2} \right) = 360^\circ   $$
With $m=2,A=2100,n=5,B=2000$ I got $r = 2337.826133.$ Double that and you get the diameter you want.
This is the Law of Cosines. If you ever have more than two side lengths you can adjust the formula. I programmed this into my calculator, which is about 40 years old. 
A: Well, you shall solve the system
$$
\left\{ \matrix{
  \alpha _{\,1}  + \alpha _{\,2}  +  \cdots  + \alpha _{\,n}  = 2\pi  \hfill \cr 
  2R\sin \left( {\alpha _{\,1} /2} \right) = l_{\,1}  \hfill \cr 
  2R\sin \left( {\alpha _{\,2} /2} \right) = l_{\,2}  \hfill \cr 
  \quad \quad  \vdots  \hfill \cr 
  2R\sin \left( {\alpha _{\,n} /2} \right) = l_{\,n}  \hfill \cr}  \right.
$$
In a spreadsheet, you have better to    


*

*put the unknowns $R$ and $\alpha_1, \cdots \alpha_n$
on a row, with some tentative starting values:
$2 \pi R = l_1+\cdots + l_n$, $\alpha_1=\alpha_2=\cdots = 2\pi/n$

*compute the sum of the square of the errors $(2R\sin \left( {\alpha _{\,k} /2} \right) - l_{\,k} )^2$

*launch the "solver" program to minimize the error, subject to $\alpha_1+\cdots +\alpha_n -2\pi=0$
