<s>[INST] 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. 
 [/INST] 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.
</s>