I am trying to determine the minima and maxima of $f(x,y)=e^{\frac{x}{2+y}}$ on $K=[-1,1]\times[-1,1]$.
$f_x=\frac{e^\frac{x}{2+y}}{2+y}\neq0 \ \forall x,y \in \mathbb{R}$ so there are no extrema on $(-1,1) \times(-1,1)$ but as $f$ is continuous and $K$ is compact $f$ must have extrema on $K \setminus (-1,1)\times(-1,1)$.
So I decided to look at
$f(x,1)=e^\frac{x}{3}$
$f(x,-1)=e^x$
$f(1,y)=e^\frac{1}{2+y}$
$f(-1,y)=e^\frac{-1}{2+y}$
$f(1,1)=e^\frac{1}{3}$
$f(-1,-1)=e^{-1}$
$f(1,-1)=e$
$f(-1,1)=e^\frac{-1}{3}$
Therefore $f$ has a global maximum on $(1,-1)$ with $f(1,-1)=e$ and a global minimum at $(-1,1)$ with $e^{-1}$. Is that correct? And if so, how would a rigorous reasoning look like?
Thanks!

A rigorous reasoning would start by calculating the gradient vector (differentiate with respect to each vector), then calculating when it equals zero on the said domain to deduce the variation of this 2D function $f$. However, what you did is kind of equivalent, but not very rigorous.