I am trying to determine the maximum and minimum of the function $f(x, y) = x^2 + y^2 + xy + 2$ with constraint $g(x, y) = x^2 + y^2 − 9=0$.
What I have so far:
$f_x=2x+y$ and $f_y=2y+x$
$g_x=2x$ and $g_y=2y$
So by Lagrange:
1) $2x+y=2\lambda x$
2) $2y+x=2\lambda y$
Rearranging 1) I found $\lambda = \frac{2x+y}{2x}$, which I imput into 2) to get that $x =\pm y$. I then put that result back into $\lambda = \frac{2x+y}{2x}$ to get that $\lambda = \frac{1}{2} or \frac{1}{3}$
I then put $x = \pm y$ into $g(x,y)$ to get that $x^2+x^2-9=0$ $\Rightarrow 2x^2=9 \Rightarrow x= \pm \sqrt{\frac{9}{2}}= \pm \frac{3}{\sqrt 2}$.
This leaves me with 4 critical points $(\frac{3}{\sqrt 2},\frac{3}{\sqrt 2})$, $(-\frac{3}{\sqrt 2},\frac{3}{\sqrt 2})$, $(\frac{3}{\sqrt 2},-\frac{3}{\sqrt 2})$ and $(-\frac{3}{\sqrt 2},-\frac{3}{\sqrt 2})$.
Is this correct? I'm convinced I've messed up at some point along the way, how do I determine which are maximum or minimum?
Plug in your critical points in $f$ to find which ones are the max/mins.