<s>[INST] Solution set to non-linear equation of $3$ variables I have the following trigonometric equation of $3$ variables:
$$f(\theta,\lambda,\phi)=3 \cos (\theta ) \cos (\lambda ) \cos (\phi
   )-(\cos (\theta )+3) \sin (\lambda ) \sin
   (\phi )$$
$$-\sin (\theta ) \cos (\lambda )+\sin
   (\theta ) \cos (\phi )+3 \cos (\theta )+\cos
   (\lambda ) \cos (\phi )-7$$
I want to prove that the solution set to the equation $f(\theta,\lambda,\phi)=0$ is
$$S_f=\{(2\pi k,\lambda+2\pi m,-\lambda+2\pi n):k,m,n\in\mathbb{Z},\lambda\in\mathbb{R}\}$$
Graphically, it is easy to see that this is the case but everything I have tried so far has failed to prove the conjecture. Perhaps my best attempt was extrapolating this equation into an unwieldy polynomial of $3$ variables
$$P(x,y,z)=9 x^4 y^2+16 x^4-18 x^3 y^2-192 x^3+9 x^2
   y^4+z^4 \left(\left(x^2-1\right)
   y^2+1\right) \left(16 \left(x^2-1\right)
   y^2+(3 x+5)^2\right)-64 x^2 y^2+z^2
   \left((x-1) (x+1) \left(9 x^2+30 x+41\right)
   y^4+2 x (x (48 (x-5) x+187)+234) y^2+x (x (9
   (x-2) x-64)-78)-74 y^2+151\right)+736 x^2+2
   y z^3 \left(9 x^4+12 x^3-20 x^2+(x-1) (x+1)
   (x (31 x-78)-33) y^2-96 x-33\right)+2 y z
   \left(31 x^4-270 x^3+560 x^2+(x (x (3 x (3
   x+4)-20)-96)-33) y^2-210 x-111\right)+30 x
   y^4-78 x y^2-960 x+25 y^4+151 y^2+400$$
over the domain $(x,y,z)\in [-1,1]^3$. If I can prove that the solution set to $P(x,y,z)=0$ over this domain is
$$S_P=\{(1,y,y):y\in[-1,1]\}$$
then the original conjecture would be solved. The motivation behind this is actually proving a certain type of quantum error detection encoding exists. It's a little difficult to explain (although if anyone wants details I am more than happy to provide them) but suffice to say that after a lot of work I managed to whittle my existence proof down to the conjecture above.
 [/INST] Let $\;x=\tan\dfrac\theta2,\;y=\dfrac{\lambda+\varphi}2,\;z=\dfrac{\lambda-\varphi}2,\;$ then
$$g(x,y,z) = (1-x^2)(2\cos2y+\cos 2z+3)+4x\sin y\sin z\\
+(1+x^2)(-\cos2y+2\cos2z-7)\\
= (-3\cos2y+\cos2z-10)x^2+4x\sin y\sin z+\cos2y+3\cos2z-4\\
= (-6\cos^2y-2\sin^2z-6)x^2+4x\sin y\sin z - 2\sin^2y-6\sin^2z=0,$$
$$-6(1+\cos^2y)x^2-2(x\sin z-\sin y)^2-6\sin^2z=0.\tag1$$
From $(1)$ should
$$x=0,\quad y=\pi j,\quad z=\pi l,\tag2$$
and finally
$$\color{green}{\mathbf{\theta=2\pi k,\quad \lambda=\pi m,\quad \varphi=2\pi n-\lambda,\quad k,m,n\in\mathbb Z.}}$$
</s>