# Why does $\cos(x) + \cos(y) – \cos(x + y) = 0$ look like an ellipse?

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?

It looks like an ellipse because the isocurves of any smooth surface look like an ellipse in the vicinity of an extremum !

Indeed, by Taylor’s development in 2D,

$$f(x,y)=f(a,b)+\frac{\partial f}{\partial x}(x-a)+\frac{\partial f}{\partial y}(y-b)\\ +\frac12\frac{\partial^2 f}{\partial x^2}(x-a)^2+\frac{\partial^2 f}{\partial x\partial y}(x-a)(y-b)+\frac12\frac{\partial^2 f}{\partial y^2}(y-b)^2\cdots$$

This development shows that in the vicinity of an ordinary point, a smooth surface usually behaves like a plane because the linear terms dominate, and isocurves are approximately straight lines.

But when the first derivatives are zero, the next order terms, the quadratic ones, enter into play and the behavior becomes that of a quadric. The isocurve $f(x,y)=F$ is approximately of the form

$$A(x-a)^2+2B(x-a)(y-b)+C(y-b)^2=D,$$
an ellipse centered at $(a,b)$. (Provided that the quadratic form is positive-definite, i.e. not a saddle point.)

The closer you get to the extremum, the more you get an exact ellipse. The effect is more pronounced and the curves more symmetric when the third order derivatives are small.

In the case of the given trigonometric function, translating the coordinates to $(\pi,-\pi)$, to bring a maximum at the origin, we get

$$z=\cos(x)+\cos(y)+\cos(x+y).$$

Then the Taylor development up to fourth order yields

$$z\approx 3-x^2-xy-y^2+\frac{x^4}{12}+\frac{x^3y}6+\frac{x^2y^2}4+\frac{xy^3}6+\frac{y^4}{12}.$$

The plot below shows you the isocurve $z=0$ computed with the quadric (brownish) and quartic (pinkish) approximations; the latter is indistinguishable from the true curve, a quasi-ellipse.