[Math] Find maximum and minimum values of the function in the region

analysislagrange multipliermultivariable-calculus

I have $z = -x^2-2x-y^2+6y+8$ and region $D = (x+1)^2 + (y-3)^2 \le 1.$
Here is what I have

1)Finding stationary point:

$\frac{\partial z} {\partial x} = -2x-2=0; x=-1;\\
\frac {\partial z} {\partial y} = -2y+6=0; y=3;$
Getting $M_0(-1;3) \in D$
$\frac {\partial^2z} {\partial x^2} = -2; \frac {\partial^2z} {\partial y^2} = -2;\frac {\partial^2z} {\partial x \partial y} = 0;$ (conditions of an extremum are met)
Verifying $AC – B^2 > 0$, where $A = -2, C = -2$ and $B = 0$:
$-2\cdot(-2)-0>0$ (true). And $A < 0$ therefore it's a maximum point.
$z_{max}= z(-1;3) = -1+2-9+18+8 = $ 18

2)We explore the region border - Here is where my problem is.  

I've used 2 ways to find critical points:
1) separate $y$ or $y^2$ and then put in original expression and 2) use the Lagrange formula.
When I'm trying to get $y$ or $(y-3)^2$ or $y^2$ and put it back into original expression I'm getting situation when all the $x$ variables are reduced (e.g. $z=-x^2-2x-y^2+6y+8 = -x^2-2x-(y-3)^2+9+8;\\
(y-3)^2 = 1-(x+1)^2;\\
z = -x^2-2x-1-(x-1)^2+17=17$
When using Lagrange formula I'm getting $x$ and $y$ without $\lambda$:
$x=-2; y=3$
So it gives me point $M_1(-2;3)$. But I'm not sure whether I do everything correctly. Can you help me with this? Maybe I'm wrong with first way or with second? Or I'm wrong at all? The task looks simple.
Thanks in advance to all!

Best Answer

An easier way of doing this is realizing the following:
$$-x^2-2x-y^2+6y+8=-(x+1)^2-(y-3)^2+18$$

So, of course $(-1,3)$ is a local maximum. In fact, we can say with certainty that it is a global maximum, since $ (x+1)^2+(y-3)^2 \geq 0$

The minimum value of $f(x,y)$ on $D$ must be $17$, since for all $(x_0, y_0)$ in $D$, $(x_0+1)^2+(y_0-3)^2\leq1$, implying the following: $$f(x_0,y_0)=-(x_0+1)^2-(y_0-3)^2+18\geq-1+18=17$$

Related Question