Find sup and inf of a multivariable function

real-analysis

if i'm given that $f(x,y)=(x+y)^2$ with $A=B=[-1,1]$ I want to show that

$$\sup_{x\in A}\inf_{y\in B}f(x,y)\neq\inf_{y\in B}\sup_{x\in A}f(x,y)$$

I can show this by doing it directly, but I'm not sure how can I find $\sup_{x\in A}\inf_{y\in B}f(x,y)$ and the opposite? (inf first then sup). Here's what I tried.

$$\sup_{x\in A}\left(\inf_{y\in B}f(x,y)\right)$$

gives me $-1-x\leq y \leq 1-x$, taking the supremum of this gives me $-2\leq y \leq 0$ giving me $0$. while doing it the with first sup then if gave me $-1-y\leq x\leq 1-y$, taking the infimum gave me $0\leq x\leq 2$ which gives me $0$ too?

Best Answer

I agree that $$\sup_{x\in A}\left(\inf_{y\in B}f(x,y)\right) = 0.$$ Specifically, we have, for any $x \in [-1, 1]$, $$\inf_{y \in B} f(x, y) = \inf_{y \in [-1, 1]} (x + y)^2 = 0,$$ as regardless of $x \in [-1, 1]$, we get a minimum of $y = -x \in [-1, 1]$. Then, we are taking the supremum over the constantly $0$ function, which is indeed $0$.

On the other hand, let's consider $$\sup_{x \in A} f(x, y) = \sup_{x \in [-1, 1]} (x + y)^2.$$ Regardless of the value of $y$, the map $x \mapsto (x + y)^2$ is a parabola with a minimum, and will achieve the maximum in $[-1, 1]$ at an endpoint, i.e. at $x = \pm 1$. The vertex of the parabola occurs at $-y$ and the maximum value occurs at the furthest endpoint from $-y$. So, the maximum occurs at $x = 1$ if $y \ge 0$, and at $x = -1$ if $y \le 0$ (yes, at $y = 0$, it occurs at both endpoints). Therefore, $$\sup_{x \in [-1, 1]} (x + y)^2 = \begin{cases} (y + 1)^2 & \text{if } y \ge 0 \\ (y - 1)^2 & \text{if } y < 0. \end{cases}$$ If $y \ge 0$, then $y + 1 \ge 1$, and hence $(y + 1)^2 \ge 1$. If $y < 0$, then $y - 1 < -1$, and hence $(y + 1)^2 > 1$. Either way, $1$ is a lower bound for this function, which is achieved at $y = 0$. Therefore, $$\inf_{y \in [-1, 1]} \sup_{x \in [-1, 1]} (x + y)^2 = 1 \neq 0.$$