It is pretty easy to show that there is NO point in the interior of $\displaystyle 0\le x \le \pi/4$ and $\displaystyle 0\le y\le \pi/4$ where grad f is 0 so any max and min must on the boundary. One boundary is the line x= 0: on that line f(0, y)= sin(y)+ cos(y). Is there any place on that line where f_y(0, y)= 0. Another is the line $\displaystyle x= \pi/4$: on that line $\displaystyle f(\pi/4, y)= \sqrt{2}/2+ sin y+ cos(\pi/4+ y)$. Is there any place on that line where $\displaystyle f_y(\pi/4, y)= 0$? Of course the same thing applies to the lines $\displaystyle y= 0$ and $\displaystyle y= \pi/4$. Any you need to check the values at the corners: $\displaystyle f(0, 0)= 1$, $\displaystyle f(\pi/4, 0)= \sqrt{2}$, $\displaystyle f(0, \pi/4)= \sqrt{2}$, $\displaystyle f(\pi/4, \pi/4)= \sqrt{2}$.