Finding the local extrema of this trigonometric, multivariate function QUESTION
Find all extrema and their places for $$ f(x,y) = \mathtt{sin} x + \mathtt{cos} y + \mathtt{cos} (x-y)$$
for $ 0 \le x \le \frac{\pi}{2}$ and  $ 0 \le y \le \frac{\pi}{2}$ 
ATTEMPT
I go ahead and find the first order partial derivatives:
$$f_x = \mathtt{cos} x - \mathtt{sin} (x-y) $$
$$f_y = - \mathtt{sin} y +  \mathtt{sin} (x-y) $$
Equating them to zero to find the critical points, I get the following system of equations - (now this is where things get tricky for me - not completely sure if I'm making the right conclusions)
For $f_x = 0$:
$$ - \mathtt{sin} y = - \mathtt{sin} (x-y) ...(1) $$
$$\Rightarrow y = x -y \Rightarrow 2y = x ...(2)$$
Then for $f_y = 0$:
$$ \mathtt{cos} x = \mathtt{sin} (x-y)...(3)$$
then from (2):
$$\mathtt{sin} (x-y) = \mathtt {sin} y = \mathtt {sin} \frac{x}{2}...(4) $$
(2) and (3) give:
$$ \mathtt{cos} x = \mathtt{sin} \frac{x}{2}...(5)$$
Now having looked at the sin and cos graph, I found that the two only intersect at $$ \mathtt {sin} \frac{\pi}{4} = \mathtt {cos} \frac{\pi}{4}$$ in the interval given. 
I guess I don't know how to move forward from here...
Do I equate the variables to $\frac{\pi}{4}$ and feel things out from there? Cause when I do that I come to some weird-looking three-way equality sign equations that don't seem right.
e.g.
$$ x = \frac{x}{2} = \frac{\pi}{4}$$
I understand how to find local extrema etc but I think its the sin/cos thing thats messing with me. Basic trigonometry...

You have found ($x = \pi/4$) values of $x$ where $\sin(x) = \cos(x)$. You need to find values of $x$ such that $\cos(x) = \sin(x/2)$ instead (i.e. the graphs of $\cos(x)$ and $\sin(x/2)$ intersect: http://www.wolframalpha.com/input/?i=plot+cos%28x%29%2C+sin%28x%2F2%29 ).
For instance, if $x = -\pi$, then $\sin(-\pi/2) = -1 = \cos(-\pi)$. There are other solutions as well. Of course, you want the answer between $0$ and $\pi/2$, but I'll leave it to you to find it.
