<s>[INST] Solve trigonometric equations with sin and cos I have two equations for two unknowns $u_k$ and $v_k$:
$\tan{u_1} \tan{u_k} + \cos{(v_1 - v_k)} = 0$
$\tan{u_2} \tan{u_k} + \cos{(v_2 - v_k)} = 0$
where $u_1$, $v_1$, $u_2$ and $v_2$ are parameters.
I managed to find a general solution for $v_k$ by expanding $\cos{(v_i - v_k)} = \cos{v_i} \cos{v_k} + \sin{v_i} \sin{v_k}$ and then dividing to obtain a general solution for $v_k$:
$\tan{v_k} = \frac{\tan{u_2} \cos{v_1} - \tan{u_1} \cos{v_2}}{\tan{u_1} \sin{v_2} - \tan{u_2} \sin{v_1}}$
However, I cannot find a general algebraic solution for $u_k$ not containing $v_k$. I have only obtained the following identities
$\tan{u_k} = \frac{\sin{(v_2 - v_1)}}{\tan{u_1} \sin{v_2} - \tan{u_2} \sin{v_1}} \cos{v_k}$
$\tan{u_k} = \frac{\tan{u_2} \cos{v_1} - \tan{u_1} \cos{v_2}}{\sin{(v_2 - v_1)}} \sin{v_k}$
but have been unable to get rid of the $v_k$ from either of them as I always start with both a sine and a cosine of it. Squaring the equations did not help, too.
Is there a way to get $u_k$ as a function of just $u_1$, $v_1$, $u_2$ and $v_2$?
 [/INST] $$\tan{u_1} \tan{u_k} + \cos{(v_1 - v_k)} = 0\\
\tan{u_2} \tan{u_k} + \cos{(v_2 - v_k)} = 0$$
You reached:
$$\tan{u_k} = \frac{\sin{(v_2 - v_1)}}{\tan{u_1} \sin{v_2} - \tan{u_2} \sin{v_1}} \cos{v_k},\tan{u_k} = \frac{\tan{u_2} \cos{v_1} - \tan{u_1} \cos{v_2}}{\sin{(v_2 - v_1)}} \sin{v_k}$$
Try calculating: $\sin^2v_k+\cos^2v_k=1$:
$$\left(\frac{\tan u_k\sin(v_2-v_1)}{\tan{u_2} \cos{v_1} - \tan{u_1} \cos{v_2}}\right)^2+
\left(\frac{\tan u_k(\tan{u_1} \sin{v_2} - \tan{u_2} \sin{v_1})}{\sin{(v_2 - v_1)}}\right)^2=1$$
So:
$$u_k=\arctan\left(\left(\frac{\sin(v_2-v_1)}{\tan{u_2} \cos{v_1} - \tan{u_1} \cos{v_2}}\right)^2+
\left(\frac{\tan{u_1} \sin{v_2} - \tan{u_2} \sin{v_1}}{\sin{(v_2 - v_1)}}\right)^2\right)^{-1/2}$$
</s>