I am stuck in understanding how I can deduce if the solution I found is a max or a min. The exercise reads:
$$\max \quad f(x, y) = 2x - y \qquad \text{subject to} \qquad \begin{cases} x^2+y = 2 \\ x+y \geq 0 \\ x \geq 0 \end{cases}$$
I wrote the problem in standard form, that is:
$$\max \quad f(x, y) = 2x - y \qquad \text{subject to} \qquad \begin{cases} x^2+y = 2 \\ -x-y \leq 0 \\ x \geq 0 \end{cases}$$
I derived the Lagrangian:
$$L(x, y, \lambda, \mu) = 2x - y - \lambda(x^2+y-2) - \mu(-x-y)$$
And I wrote down the optimal conditions:
$$\begin{cases}2 - 2\lambda x + \mu \leq 0 \\ x(2 - 2\lambda x + \mu) = 0 \\ -1-\lambda + \mu = 0 \\ x^2+y = 2 \\ x+y\geq 0 \\ \mu(x+y) = 0 \\ x, \mu \geq 0 \end{cases} $$
From here I distinguished two cases over $\mu$. If $\mu = 0$ I obtain $\lambda = -1$ and from here $x = 0$ or $x = -1$, but they are both non acceptable.
Thence it must be $\mu > 0$ hence the second constraint is active. From here I got $y = -x$, so that the first equation becomes $x^2-x-2 = 0$, hence $x = 2$ or $x = -1$ but the second is again not acceptable.
With $x = 2$ I ave $y = -2$ hence the point I get is $(2, -2)$ which is fine, with $\lambda = 1$ and $\mu = 2$.
QUESTION
How do I go on from here? How I understand if this is a max or a min? Since my feasible region is not compact, I cannot state it's a maximum.
Also I cannot use geometric methods like level curves.
Can you help me? Is there some general approach?
The feasible region is compact. It's the portion of the parabola $y = 2 - x^2$ for $0 \leq x \leq 2$. The parallel lines are some of the level curves of the objective function, which you can see takes its maximum on this curve at $(x, y) = (2, -2)$, where $f(x, y) = 6$.
When you have a finite collection of candidates for max and min, just evaluate the objective function at those points (in a table if you like) and pick out the largest and smallest.