Function with 2 variables $ f(x,y)=(x-y)e^{xy} $ Find minimum and maximum  of the next function:
$$ f(x,y)=(x-y)e^{xy} $$
In the square:
$$ \left\{\begin{matrix}
-1\leq x\leq 1 \\ -1\leq y\leq 1 
\end{matrix}\right. $$
I have found that $f(x,y)$ doesn't have maxima and minima. by that I mean without looking at the square, just at the function.
 A: $$\begin{align}&f_x=e^{xy}\left(1+xy-y^2\right)=0\iff y^2-xy=1\\{}\\&f_y=e^{xy}\left(-1+x^2-xy\right)=0\iff x^2-xy=1\end{align}$$
Substracting both equations above we get $\;(x-y)(x+y)=0\implies x=\pm y\;$ , and we have lots of critical points.
Now:
$$\begin{align}&f_{xx}=e^{xy}\left(2y+xy^2-y^3\right)\\{}\\&f_{xy}=e^{xy}\left(2x+x^2y-xy^2\right)\\{}\\&f_{yy}=e^{xy}\left(-2x+x^3-x^2y\right)\end{align}$$
Evaluate now the Hessian at critical points and you'll see there're lots of max.-min. points inside the square. Finally, you will have to compare this with values of the function on the square's perimeter.
Disclaimer: Check carefully the above calculations, which only come to serve you as a guide. There might be mistakes.
A: Solving $\nabla f=0$ you'll pretty quickly find only two solutions $(\pm\sqrt2/2,\mp\sqrt2/2)$, which are both saddles.  Now look at the boundary, for example $x=1$ and $-1\leq y\leq1$. Here $f(1,y)=(1-y)e^y$, which has a maximum in $y=0$ and minima in $y=\pm1$. Treat the rest of the boundary in a similar way.
