Minimum value of $\cos x+\cos y+\cos(x-y)$

What is the minimum value of $$ \cos x+\cos y+\cos(x-y). $$ Here $x,y$ are arbitrary real numbers. Mathematica gives (with NMinimize) $-3/2$. But I don't know if this is correct and if so, how to prove it.


The local max or min of a 2-variable function comes where both partial derivatives are 0. So if we say that

$$ z = \cos x+\cos y+\cos(x-y) $$ then $$ \frac{\partial z}{\partial x} = \sin x + \sin(x-y) = 0 $$ and $$ \frac{\partial z}{\partial y} = \sin y - \sin(x-y) = 0 $$ adding the two yields

$$ \begin{align} \sin (x) + \sin(y) &= 0 \\ \rightarrow \sin (x) &= -\sin(y) \\ \rightarrow x &= -y \end{align} $$ plugging that into the first partial yields $$ \begin{align} \sin x + \sin(x+x) &= 0 \\ \rightarrow \sin x &= - \sin(2x) \\ \rightarrow x &= -2x + 2\pi\text{*} \\ \rightarrow 3x &= 2\pi \\ \rightarrow x &= \frac{2\pi}{3} \approx 2.1 \end{align} $$ and $$ y = -\frac{2\pi}{3} \approx -2.1 $$

plugging those values into the original equation yields

$$ \begin{align} \mathcal z &= \cos (\frac{2\pi}{3})+\cos (-\frac{2\pi}{3})+\cos(\frac{4\pi}{3})\\ &= -\frac{1}{2} -\frac{1}{2} -\frac{1}{2}\\ &= -\frac{3}{2} \end{align} $$

*x=0 would fit as well but that would be a local maximum. The proof of that is left for the student.


Consider 3 coplanar unit vectors $\hat{\alpha}$ , $\hat\beta$ , $\hat\gamma$

Let $X$ be the angle between $\hat\alpha$ and $\mathrm{\hat\beta}$ and let $Y$ be the angle between $\hat\beta$ and $\hat\gamma$ then it follows that the angle between $\hat\alpha$ and $\hat\gamma$ is $(X+Y)$, hence we can say that:-

$$\hat\gamma\cdot\hat\alpha + \hat\alpha\cdot\hat\beta + \hat\beta\cdot\hat\gamma= \cos{X} + \cos{Y} + \cos{(X+Y)}$$

$$ {(\hat\alpha + \hat\beta + \hat\gamma)}^{2} \ge 0\\ \implies\hat\alpha^2 + \hat\beta^2 + \hat\gamma^2 + 2(\hat\gamma\cdot\hat\alpha + \hat\alpha\cdot\hat\beta + \hat\beta\cdot\hat\gamma) \ge 0$$ Since $\hat\alpha^2 + \hat\beta^2 + \hat\gamma^2=3$, we can say that:-$$\hat\gamma\cdot\hat\alpha + \hat\alpha\cdot\hat\beta + \hat\beta\cdot\hat\gamma= \cos{X} + \cos{Y} + \cos{(X+Y)} \ge \frac{-3}{2}$$

This result can be extended to the given equation by replacing $Y$ with $(-Y)$ since cos is an even function.