Trigonometric rule on a spherical square
Solution 1:
Given a spherical square whose side length is $a$ and vertex angle is $ \beta$. Draw one of the diagonals (this diagonal will bisect the vertex angles) & call the length of this diagonal $x$, this will split the square into two isoceles triangles. Consider one of these trianlges, it will have lengths $a,a,x$ and opposite angles $\beta/2, \beta/2, \beta$ respectively. By the sine rule we have
\begin{eqnarray*}
\frac{\sin(x)}{\sin(\beta)} =\frac{\sin(a)}{\sin(\frac{\beta}{2})} \\
\sin(x) = 2 \sin(a) \cos(\frac{\beta}{2}).
\end{eqnarray*}
Now apply the cosine rule (using the diagonal as the base)
\begin{eqnarray*}
\cos(x)=\cos^2(a)+\sin^2(a) \cos(\beta) \\
\cos(x)=1-2\sin^2(a) \sin(\frac{\beta}{2}).
\end{eqnarray*}
Square the above equation & Pythagorus ... we have
\begin{eqnarray*}
\sin^2(x)=4 \sin^2(a) \sin^2(\frac{\beta}{2})(1-\sin^2(a) \sin^2(\frac{\beta}{2})).
\end{eqnarray*}
From the sin rule we can eliminate $x$ ... we have
\begin{eqnarray*}
\cos^2(\frac{\beta}{2})= \sin^2(\frac{\beta}{2})(1-\sin^2(a) \sin^2(\frac{\beta}{2})) \\
\sin(a)=\frac{-\cos(\beta)}{\sin^4(\frac{\beta}{2})}=\frac{-4 \cos(\beta)}{(1-\cos(\beta))^2}
\end{eqnarray*}
Now pythagorus, square root & we are done
\begin{eqnarray*}
\color{red}{\sin(a)=\frac{1+\cos(\beta)}{1-\cos(\beta)}} = \color{blue}{\cot \left( \frac{\beta}{2} \right)}.
\end{eqnarray*}
Perhaps the nicest example of a square project onto the surface of a sphere is a cube ...
REF WIKI : https://en.wikipedia.org/wiki/Cube#Spherical_tiling
In this case the vertex angle is $\beta =\frac{ 2 \pi}{3}$ and the edge length angle is $a=\cos^{-1}(\frac{1}{3})$.
Solution 2:
Let $a$ be a side of the square, $b$ be a diagonal, and $\beta$ be a vertex angle. Draw both diagonals, which bisect and are perpendicular to each other. Apply the spherical Pythaorean Theorem to any of the four triangles thus formed:
$\cos a = (\cos(b/2))^2=(1+\cos b)/2$
$\cos b =2\cos a-1$
Now apply the Law of Cosines to one of the larger triangles formed by just one diagonal:
$2\cos a-1 = \cos^2 a + \sin^2 a \cos \beta$
Subtracting $\cos^2 a$ and using standard identities gives
$-(1-\cos a)^2 = (1+\cos a)(1-\cos a) \cos \beta$
Cancel out the common factor $(1-\cos a)$ and then solve for $\cos a$ to get:
$\cos a = \frac{1+\cos \beta}{1-\cos \beta}=\frac{2\cos ^2 (\beta/2)}{2\sin ^2 (\beta/2)}=\cot ^2 (\beta/2)$
Solution 3:
Consider the diagram
Using the Spherical Law of Cosines, we get $$ \cos(\rho)^2=\cos(\alpha)\tag{1} $$ Then the Spherical Law of Sines says $$ \begin{align} \frac{\sin^2(\alpha)}{1} &=\frac{\sin^2(\rho)}{\sin^2(\beta/2)}\\ &=\frac{1-\cos(\alpha)}{\sin^2(\beta/2)}\tag{2} \end{align} $$ Therefore, $$ \begin{align} \sin^2(\beta/2) &=\frac{1-\cos(\alpha)}{\sin^2(\alpha)}\\ &=\frac1{1+\cos(\alpha)}\tag{3} \end{align} $$ Thus, $$ \begin{align} \cos(\alpha) &=\csc^2(\beta/2)-1\\[5pt] &=\cot^2(\beta/2)\\ &=\frac{1+\cos(\beta)}{1-\cos(\beta)}\tag{4} \end{align} $$