Solving Simultaneous Equations with Nested Trigonometric and Inverse Trigonometric functions. Deriving an equation for the geodesic on a sphere between two arbitrary points A and B given in spherical coordinates, I obtained
$$\theta = -\arcsin{\left(c \cot{\phi}\right)} - d,$$
where $c$ and $d$ are constants.
How can I go about finding the values of $c$ and $d$ in terms of the coordinates of $A$ and $B$, $(R, A_{\theta}, A_{\phi})$ and $(R, B_{\theta}, B_{\phi})$ respectively?
If I substitute the values into the equation, I obtain simultaneous equations where I can cancel out $d$, but I am unable to make $c$ the subject of the resulting equation:
$$A_\theta-B_\theta = \arcsin{(c \cot{B_\phi})} - \arcsin{(c \cot{A_\phi})}$$
How can I go about this? Thank you so much!
 A: $$A_\theta-B_\theta = \sin ^{-1}\big[c \cot (B_\phi)\big] -\sin ^{-1}\big[c \cot (A_\phi)\big]\tag 1$$
For personal convenience, I shall change notations
$$k=A_\theta-B_\theta \qquad \alpha =\cot (B_\phi)\qquad \beta =\cot (A_\phi)\qquad x=c$$ which make
$$k= \sin ^{-1}(\alpha x)- \sin ^{-1}(\beta x)\tag 2$$ Apply the sine  to both sides
$$\sin(k)=\alpha  x \sqrt{1-\beta ^2 x^2}-\beta  x \sqrt{1-\alpha ^2 x^2}\tag 3$$  Let $\gamma=\sin(k)$, square twice and you face a quartic equation in $y=x^2$
$$a_4\,y^4+a_3\,y^3+a_2\,y^2+a_1\,y+a_0=0$$ where
$$a_4=\alpha ^4 \left(\beta ^2-1\right)^2 \quad\quad a_3=-2 \alpha ^2 \left(\alpha ^2-1\right) \left(\beta ^2-1\right)$$ $$a_2=\left(\alpha ^2-1\right)^2+2 \alpha ^2 \left(\beta ^2+1\right) \gamma ^2   \quad\quad a_1=-2 \left(\alpha ^2+1\right) \gamma ^2\quad\quad a_0=\gamma ^4$$  Solving with radicals, the real roots are
$$y_1=\frac{\gamma ^4}{\gamma ^2 \left(\alpha ^2+\beta ^2\right)+2 \sqrt{\alpha ^2 \beta ^2   \gamma ^4 \left(1-\gamma ^2\right)}}$$
$$y_2=\frac{\gamma ^4}{\gamma ^2 \left(\alpha ^2+\beta ^2\right)-2 \sqrt{\alpha ^2 \beta ^2   \gamma ^4 \left(1-\gamma ^2\right)}}$$
