<s>[INST] Find maximum/minimum for $\cos(2x) + \cos(y) + \cos(2x+y) $ I have not been able to find the critical points for $\cos(2x) + \cos(y) + \cos(2x+y) $
 [/INST] This might be a solution.
Set $X=2x$ and $\cos(X)=(1-t^2)/(1+t^2),\cos(y)=(1-s^2)/(1+s^2)$,$\sin(X)=(2t)/(1+t^2),\cos(y)=(2s)/(1+s^2)$, then the original expression becomes:
$$\cos(X) + \cos(y) + \cos(X+y)=f(s,t)=\frac{3 - s^2 - 4 s t - t^2 - s^2 t^2}{(1+s^2)(1+t^2)}$$
where
$$f(s,t)=3 - s^2 - 4 s t - t^2 - s^2 t^2$$
From $f(s,t)=0$, we can solve for $t$:
$$t=\frac{-2 s \pm \sqrt{3 + 6 s^2 - s^4}}{1 + s^2}$$
Notice that:
$$\sqrt{3 + 6 s^2 - s^4}=\sqrt{(s^2-(3-2\sqrt{3}))(3+2\sqrt{3}-s^2)}$$
Thus when $3+2\sqrt{3}\ge s^2\ge(3-2\sqrt{3})$ and $s\in \mathbb{R}$, we have real solutions for $t$.  Thus we require $3+2\sqrt{3}\ge s^2\ge 0$.
</s>