Trigonometric elimination between two variables Eliminate $\theta$ and $\phi$ between the following equations: $$\begin{cases}\sin \theta + \sin \phi = x \\ \cos \theta + \cos \phi = y \\ \tan \frac {\theta}{2} \tan \frac {\phi}{2} = z\end{cases}$$
What I've done so far
I've established that $$\tan \left(\frac {\theta+\phi}{2}\right) = \frac {\sin \theta + \sin \phi}{\cos \theta + \cos \phi}$$ so that $$\tan \frac {\theta+\phi}{2} = \frac {x}{y}.$$
I then used the  trigonometric identity $$\tan \left(\frac {\theta+\phi}{2}\right) = \frac {\tan \frac {\theta}{2} + \tan \frac {\phi} {2}}{1-\tan \frac {\theta}{2}\tan \frac {\phi} {2}}$$ and with a little manipulation got to $$\tan \frac {\theta}{2} + \tan \frac {\phi} {2} = \frac {x(1-z)}{y}$$
I'm stumped on the next steps...would I have to find the difference of the roots also (i.e. $\tan \frac {\theta}{2} - \tan \frac {\phi} {2}$)?  Or is there a simpler way?  (Side note: I also tried $\tan \frac {\theta}{2}$ substitution but that went nowhere.)
 A: By sum to product and product to sum formulas we have
$$\begin{cases}
\sin \theta + \sin \phi = 2\sin\left(\frac{\theta+\phi}2\right)\cos\left(\frac{\theta-\phi}2\right)=x\\  
\cos \theta + \cos \phi = 2\cos\left(\frac{\theta+\phi}2\right)\cos\left(\frac{\theta-\phi}2\right)=y \\
\tan \frac {\theta}{2} \tan \frac {\phi}{2} =\frac{\cos\left(\frac{\theta-\phi}2\right)-\cos\left(\frac{\theta+\phi}2\right)}{\cos\left(\frac{\theta-\phi}2\right)+\cos\left(\frac{\theta+\phi}2\right)} =z
\end{cases} \implies\begin{cases}
2ab=x\\
2cb=y\\
\frac{b-c}{b+c}=z
\end{cases}$$
and since $a^2+c^2=1$ we obtain

*

*$b=\pm\frac12\sqrt{x^2+y^2}$

*$c=\pm \frac{y}{\sqrt{x^2+y^2}}$
and then
$$z=\frac{\pm\frac12\sqrt{x^2+y^2}\mp\frac{y}{\sqrt{x^2+y^2}}}{\pm\frac12\sqrt{x^2+y^2}\pm\frac{y}{\sqrt{x^2+y^2}}}=\frac{x^2+y^2-2y}{x^2+y^2+2y}$$
A: Hints
Writing $\theta=2p,\phi=2q$
We have
$$\dfrac{\sin(p+q)}x=\dfrac{\cos(p+q)}y=\pm\dfrac1{\sqrt{x^2+y^2}}$$
Using this one can find $\cos(p-q)$
Now use $$\dfrac{z-1}{z+1}=\cdots=\dfrac{\cos(p+q)}{\cos(p-q)}$$
A: Write $u = \tan \theta/2$, $v = \tan \phi/2$. Then we get
$$
\begin{cases}
2(u+v)(1 + uv) = x(1+u^2)(1+v^2) \\
2 -2u^2v^2 = y(1+u^2)(1+v^2) \\
uv = z.
\end{cases}
$$
Now setting $s = u + v$ and using the third relation, we obtain
$$
\begin{cases}
2s(1+z) = x(1 - 2z + z^2 + s^2) \\
2(1-z^2) = y(1 - 2z + z^2 + s^2).
\end{cases}
$$
Dividing, we obtain the relation $s = x(1-z)/y$, which you've already mentioned. Substituting this relation into either of the equations, we find
$$2y(1 + z) = (x^2 + y^2)(1-z).$$
