# $\cos(A-B)$ Find B when A is known without inverse cosine

Context: This is with REF to some numerical calculation

Problem statement:
Assume I know the values of $$\cos(A-B)$$, $$A$$, $$\sin(A)$$, and $$\cos(A)$$
Is there a way I can figure out $$B$$ without using inverse cosine?

Details and any research
I think there should be a way to use the identity $$\cos(A-B) = \cos(A)\cos(B) + \sin(A)\sin(B)$$ but cannot wrap my head around it to solve without going for a matrix solver.

Thanks

• That doesn't really make sense. The best you can get out is $\cos B$ and $\sin B$. Then you still need either $\cos^{-1}$ or $\sin^{-1}$ to identify $B$. Furthermore note that $\cos^{-1}(x) = \pi/2 - \sin^{-1}(x)$, so it boils down to knowing $\cos^{-1}$ anyway. – Quang Hoang Mar 13 '20 at 1:39
• Perhaps considering the concrete example $A=0$ will help convince you that something is missing. Then what you "know" only amounts to $\cos(-B) = \cos(B)$, so finding $B$ itself amounts to computing "the inverse cosine" of $\cos(B)$. – hardmath Mar 13 '20 at 2:08
• @hardmath he mentioned numerical calculation. If he can calculate arc's length of a unit circle like in my answer numerically, we do not even need $\sin{(A)}$ nor $\cos{(A)}$ – Rezha Adrian Tanuharja Mar 13 '20 at 2:33
• Thanks for the input guys. I understand there might not be a simple way of getting this done without cos inverse but that is not ideal in my situation because acos function adds ambiguity. At the moment I'm planning to solve this with iteration but thought of asking anyway to see if someone sees a connection. – m2as3registeredservices ohmone Mar 13 '20 at 2:44
• Appealing to the inverse cosine function $\cos^{-1}(A-B)$ does not add ambiguity so much as it reveals the ambiguity. You will need to know something about $A-B$ in addition to its cosine in order to uniquely determine it besides $\cos(A-B)$. So the problem is twofold: what additional information do you have, and what numerical method would you prefer to use to invert the cosine function. – hardmath Mar 13 '20 at 20:12

One way to do it is to use the identity $$\cos^2B+\sin^2B=1$$ Isolate $$\sin B$$ $$\sin B=\pm\sqrt{1-\cos^2B}$$ Your équation become $$\cos(A-B)=\cos A\cos B\pm\sin A\sqrt{1-\cos^2B}$$ where $$\cos B$$ is the only unknown.
If you know in which quadrant lies the angle $$B$$, you could restrict yourself to one equation.
I guess You can if You are calculating it numerically using unit circle $$x^{2}+y^{2}=1$$
\begin{aligned} |A-B|&=\int_{\cos{(A-B)}}^{1}{\sqrt{(dx)^{2}+(dy)^{2}}}\\ \\ &=\int_{\cos{(A-B)}}^{1}{\sqrt{1+\left(-\frac{x}{y}\right)^{2}}\ dx}\\ \\ &=\int_{\cos{(A-B)}}^{1}{\frac{dx}{\sqrt{1-x^{2}}}} \end{aligned}