# Finding critical points for a trigonometric function

Question Calculate the critical point(s) for the following function $$f =\sin(x)+\cos(y) +\cos(x-y)$$

Hint: Use the trigonometric identity $$\sin(\alpha) +\sin(\beta) = 2\sin(\frac{\alpha+\beta}{2})\cos(\frac{\alpha -\beta}{2})$$

My attempt:

$$f_x=\cos(x) -\sin(x-y)=0$$ $$f_y= -\sin(y)+\sin(x-y)=0$$

However I can't seem to get this into a form in which I can calculate the critical points or even use the identity given.

From the two equations concerning $f_x$, $f_y$ you obtained it immediately follows that $$\sin y=\sin(x-y)=\cos x\ .$$ Now $\sin y=\cos x$ is equivalent with $${\rm (i)} \quad y={\pi\over2}+x\qquad\vee\qquad{\rm (ii)} \quad y={\pi\over2}-x$$ (all angles are modulo $2\pi$).
In case (i) we then obtain $\cos x=\sin(x-y)=-1$, with consequences.
In case (ii) we obtain $$\cos x=\sin(x-y)=\sin\bigl(2x-{\pi\over2}\bigr)=-\cos(2x)=1-2\cos^2 x\ ,$$ with consequences.
Use this trigonometric formula (and the ones with $\cos$) until you only have a product of sines and cosines. Then, say it is null iff one of them is null