Consider the prolem where we need to both minimize and maximize $f(x,y) = x^2+y^2$ subject to $x = y+1$. (So $g(x,y) = x-y=1.)$
Setting up the Lagrange Multiplier equation $\nabla f(x,y) = \lambda \nabla g(x,y)$, we obtain $$ \langle 2x,2y \rangle = \lambda \langle 1, -1\rangle $$
which implies that $2x=\lambda$ and $2y=-\lambda$
Now, if $x = 0$, then $\lambda = 0$, which would imply that $y=0$, but this does not satisfy $g(x,y) = 1$. In fact, solving $2x=\lambda$ and $2y=-\lambda$ for $x = \lambda/2$ and $2y=-\lambda$ for $y = -\lambda/2$ and substituting into $g(x,y) = x-y = 1$ gives us that $$ g(x,y)=x-y = 1 \\ \implies \frac{\lambda}{2} - \left(-\frac{\lambda}{2}\right) = 1 \\ \implies \lambda = 1 \\ \implies x = \frac{1}{2}\, \text{and}\, y = -\frac{1}{2} $$
So, our only critical point is $\displaystyle \left(\frac{1}{2}, \frac{-1}{2} \right)$, which in the context of the problem cannot be both the max and the min.
My Question is: I was told that in this problem, $f$ attains its max, but its min is not attained, and I was told that in order to explain this, I need to explain the "boundary behaviour" of $f$ - i.e., what happens as we go to $\infty$ along the line $x = y+1$. However, I don't understand what is meant by that - could somebody please explain it to me?
I figured drawing a picture would be helpful, so I'm including it here:
Essentially, what I did was draw a bunch of level curves of $f$ for various constants $k$, and draw the line $g$ on the same graph, but I don't understand what is happening as we go to $\infty$ along $g$. I have to teach this to a bunch of undergrads in a few hours, and I'd like to understand what I'm trying to teach them, so if you could kindly explain it to me, I would appreciate it more than you know! Thank you.
For every $M\in\mathbb R$, there exists a point $(x,y)$ on the line $y=x+1$ such that $f(x,y)>M$. In particular, one such point would be $x=\max\{1,M\}, y=\max\{1,M\}+1$.
Therefore, the function is not bounded on the line (and has no maximum).
Another way of saying the same thing would be to say this:
If we parametrize the line as $(t,1+t)$, with $t\in\mathbb R$, then $$\lim_{t\to\infty}f(t,1+t) = \infty$$