Is there a rule for $\cos^{-1}(\cos(a)\cos(b))$ When working with spherical coordinates I have come across
$$\cos^{-1}(\cos(a)\times \cos(b))$$
and was wondering if there was some kind of identity for this that I could use instead of computing the inside of the acrccos function first.
 A: The problem with $\cos(x)$ is that near $x=0,$ $\;\cos(x)=1-x^2/2+O(x^4).\;$
Thus $\cos^{-1}(x)$ loses accuracy near $x=1$.
Let $\,\cos(c) = \cos(a)\cos(b).\,$ Use the identities
$$ (1-\cos(c))/2 = \sin(c/2)^2 $$ and
$$ \frac{1-\cos(a)\cos(b)}2 = \sin(a)\sin(b)/2+\sin^2((a-b)/2) $$
to get an equivalent formula without such accuracy loss which is
$$ c = \cos^{-1}(\cos(a)\cos(b))=2\sin^{-1}\Big(\sqrt{\sin(a)\sin(b)/2+\sin^2((a-b)/2)}\Big).$$
Notice that near $x=0,$ $\;\sin(x)=x+O(x^3).\;$ Thus for $x$ small enough, $\;\sin(x)\approx x,\;$ and we can use the simple approximation
$\;\cos^{-1}(\cos(a)\cos(b))\approx\sqrt{a^2+b^2}.\;$ Notice that in a
right spherical triangle
with legs $a,b$ and hypoteneuse $c,$ the Napier
rule $\;\cos c=\cos a\cos b\;$ holds and if the triangle has small enough sides, the Pythagorean rule approximation $\;c^2\approx a^2+b^2\;$ holds.
A: The question is essentially "is there a simple function $f(a,b)$ such that
$$\cos(f(a,b)) = \cos(a)\cos(b)?"$$
Well, if we assume that the simple form might be linear, so $f(a,b)= \lambda a + \mu b$, then taking $a=0$ and $b=0$ respectively shows that $\lambda=\mu=1$. So our only hope is
$$\cos(a+b) = \cos(a)\cos(b)-\sin(a)\sin(b)$$
which is not exact (and I suspect an exact formula that is simpler than yours might not exist), but it does approximate it to order $O(ab)$ (near $0$).
