TITLE: Why does $\cos(x) + \cos(y) - \cos(x + y) = 0$ look like an ellipse?
QUESTION [65 upvotes]: The solution set of $\cos(x) + \cos(y) - \cos(x + y) = 0$ looks like an ellipse. Is it actually an ellipse, and if so, is there a way of writing down its equation (without any trig functions)?
What motivates this is the following example. The solution set of $\cos(x) - \cos(3x + 2y) = 0$ looks like two straight lines, and indeed we can determine the equations of those lines.
$$
\begin{align}
\cos(x) &= \cos(3x + 2y) \\
\implies x &= \pm (3x + 2y) \\
\implies x + y &= 0 \text{ or } 2x + y = 0
\end{align}
$$
Can we do a similar thing for the first equation?

REPLY [3 votes]: @Mr Spock: You can go from $\cos(x)+\cos(y)=\cos(x+y)$ to a rational function (you ask about it!) via identities $$\tan (\frac x2)=t$$$$\tan (\frac y2)=s$$ $$\tan (\frac {x+y}{2})=\frac{t+s}{1-ts}$$ from which you have
$$\cos (x)=\frac{1-t^2}{1+t^2}$$ $$\cos (y)=\frac{1-s^2}{1+s^2}$$
Since $$\tan (\frac{x+y}{2})=\frac{t+s}{1-ts}$$ it follows
 $$\cos (x+y)=\frac {(1-ts)^2-(t+s)^2}{(1-ts)^2+(t+s)^2}=\frac{(1+t+s-ts)(1-t-s-ts)}{1+t^2s^2+t^2+s^2}$$ Thus
 $$2(1-t^2s^2)(1+t^2s^2+t^2+s^2)= (1+t^2)(1+s^2)[(1-ts)^2-(t+s)^2]$$
In contour plots below you can see the silhouetted “ellipses”.