<s>[INST] How can I find maximum and and minimum values of $ f(x,y)=xye^{-(x+y)}$? How can I find maximum and and minimum values of $ f(x,y)=xye^{-(x+y)}$ in the region $(x-1)^2+(y-1)^2 \leq4$ ? 
 [/INST] First look for critical points of $f$ in the interior $(x-1)^2 + (y-1)^2 < 4$. Do this by comparing the partial derivatives of $f$ to zero. Next search for critical values on the boundary $(x-1)^2 + (y-1)^2 = 4$ using Lagrange multipliers. Compute $f$ in these points and, by putting everything together, you will find the maximum and minimum of $f$ in the region.
EDIT: Computing the derivatives:
$$f_x(x,y) = x(1-y)e^{-(x+y)} \\\\
f_y(x,y) = y(1-x)e^{-(x+y)}$$
Comparing both to zero we get:
$$x(1-y) = 0 \\\\
y(1-x) = 0$$
Simultaneous solutions are $(0,0)$ and $(1,1)$, which are both within the interior (but as we will see these points don't matter anyway). Computing $f$ at these points gives $0$ and $e^{-2} \approx 0.135$ correspondingly.
Now to the boundary. It is given by $g(x,y) = 4$ where $g(x,y) = (x-1)^2 + (y-1)^2$ and the partial derivatives:
$$g_x(x,y) = 2(x-1) \\\\ g_y(x,y) = 2(y-1)$$
Using the Lagrange multipliers method, we have to solve
$$g(x,y) = 4 \\\\ f_x(x,y) - \lambda g_x(x,y) = 0 \\\\ f_y(x,y) - \lambda g_y(x,y) = 0$$
to find the critical points on the boundary. Substituting:
$$(x-1)^2 + (y-1)^2 = 4 \\\\
 y(1-x)e^{-(x+y)} - \lambda 2(x-1) = 0\\\\
 x(1-y)e^{-(x+y)} - \lambda 2(y-1) = 0$$
Assuming $x,y \neq 1$ we can divide the last two equations by $(x-1)$ and $(y-1)$ correspondingly, so they become:
$$ ye^{-(x+y)} = - 2\lambda \\\\
 xe^{-(x+y)} = - 2\lambda $$
which implies $x = y$. Substituting into $g(x,y) = 4$, we have:
$$2(x-1)^2 = 4 \quad \implies \quad x = 1 \pm \sqrt{2}$$
Corresponding values of $f$ are 
$$f(1 - \sqrt{2}, 1 - \sqrt{2}) = (3 - 2 \sqrt{2}) e^{-2 + 2\sqrt{2}} \approx 0.393 \\\\
f(1 + \sqrt{2}, 1 + \sqrt{2}) = (3 + 2 \sqrt{2}) e^{-2 - 2\sqrt{2}} \approx 0.0466$$
For the case where $x = 1$ or $y = 1$ we plug them directly into $g(x,y) = 4$ to get
$$x = 1 \quad \implies \quad (y-1)^2 = 4 \quad \implies \quad y = -1, 3 \\\\
y = 1 \quad \implies \quad (x-1)^2 = 4 \quad \implies \quad x = -1, 3$$
Corresponding values of $f$ are
$$f(-1,1) = f(1,-1) = -e^0 = -1 \\\\
f(3,1) = f(1,3) = 3e^{-4} \approx 0.0549$$
We conclude that the minimum value of $-1$ is attained at $(-1,1)$ and $(1,-1)$, and the maximum value of $(3 - 2 \sqrt{2}) e^{-2 + 2\sqrt{2}}$ is attained at $(1 - \sqrt{2}, 1 - \sqrt{2})$.
</s>