Maximum and minimum of $f(x,y) = xy$ in the region between $y=0$ and $y=x^2 -4$ 
Calculate the maximum and minimum of the function $f(x,y) = xy$ in the area blocked by the line $y=0$ and the parabola $y=x^2 -4$.

Now, first I wanted to calulate the extremum points inside the area so I did partial derivatives $=0$ and got $A(0,0)$ which is ON the edge. So we have not any maximum/minimum inside the area.
Now I want to calculate the maximum and minimum ON the edge. We can divide by two edges here, $D_1 = \{-2 \leq x \leq 2 ,  y=0\}$ and $D_2 = \{ ? \}$. How do I know the function of the edge of the bottom of the parabola?
Any help appreciated!
 A: In fact, the point $(0,0)$ is a saddle point and you can find it why this is true. 


*

*If $y=x^2-4$ then $g(x)=f(x,y)|_{y=(x^2-4)}=x^3-4x$

*If $y=0$ then $f(x,y)=xy=x\times 0=0$
So all we need happens when we walk on $z=xy$ according to flat hyperbola $y=x^2-4$. I think finding the extreme points for $g(x)=x^3-4x$ is so easy for you. That is what anothe answer shows you completely.

A: Let $f(x,y)=xy$ and $D=\{(x,y): y-x^2+4\geq 0 \cap y\leq 0\}$. This latter is a compact subset of $\mathbb R^2$. As $f$ is continuous on $D$, it attains absolute maximum and minimum on $D$ by the theorem of Weierstrass.
You have correctly solved the equation $\nabla(f)=0$, whose only solution is $(0,0)\in \partial D$, where $\partial D$  denotes the boundary of $D$. The point $(0,0)$ is our first candidate for abs. max/min.
Let us move to the analysis of the restriction of $f$ to the boundary $\partial D$ of $D$.
Note that 
$f(x,y)=0$ for all $(x,y)=(x,0)$, with $x\in [-2,2]$.
$f(x,y)=0$ for     $(x,y)=(0,-4)$.
and $f(x,y)<0$ for all $(x,y)=(x,x^2-4)$, with $x\in (0,2)$, while 
$f(x,y)>0$ for all $(x,y)=(x,x^2-4)$, with $x\in (-2,0)$.
From this we deduce that on the 2 branches of the parabola $y=x^2-4$ the function $f$ surely attains extrema.
Now let us restrict $f$ to the parabola $y=x^2-4$, by studing the function
$f(x,x^2-4)=x(x^2-4)$,
for all $x\in[-2,2]$. We arrive at the equation $\frac{df}{dx}=3x^2-4=0$, which has solutions given by
$x=\pm \frac{2}{\sqrt{3}}$.
In summary, we have 3 candidates for abs max/min:
$(0,0)$,  $(\frac{2}{\sqrt{3}},-\frac{8}{3})$, $(-\frac{2}{\sqrt{3}},-\frac{8}{3})$.
They satisfy
$f(\frac{2}{\sqrt{3}},-\frac{8}{3}))<f(0,0)<f(-\frac{2}{\sqrt{3}},-\frac{8}{3})$,
Now you can finish easily the exercise. 
ps: It is a good exercise to check whether $(0,0)$,  $(\frac{2}{\sqrt{3}},-\frac{8}{3})$, $(-\frac{2}{\sqrt{3}},-\frac{8}{3})$ are maxima or minima (or neither a max nor a min) using  definitions. All you need is to check whether exists a neighborhood $U$ of $(0,0)$,  $(\frac{2}{\sqrt{3}},-\frac{8}{3})$, $(-\frac{2}{\sqrt{3}},-\frac{8}{3})$ s.t. for all points in $U\cap D$ one of the following inequalities holds
$f(x,y)-f(0,0)<0$    (maximum)
$f(x,y)-f(0,0)>0$    (minimum)
and similarly for  $(\frac{2}{\sqrt{3}},-\frac{8}{3})$, $(-\frac{2}{\sqrt{3}},-\frac{8}{3})$.
A: I'll illustrate the maximum value.  The function $f(x,y)=x y$ has level curves $f(x,y)=c$ that are hyperbolae $y=c/x$.  The value of $c$ increases as the vertex of the hyperbolae is further from the origin.  Thus the maximum is achieved by one such hyperbola that is tangent to the boundary $y=x^2-4$.  Thus, we need to find a $c$ such that the slopes of the hyperbola and parabola boundary match:
$$-\frac{c}{x^2} = 2 x$$
or $x = -(c/2)^{1/3}$.  This hyperbola and parabola are indeed tangent when
$$\frac{c}{x} = x^2-4$$
or, plugging in the above value of $x$, we get an equation for $c$:
$$\frac{3 c}{2} = 4 \left ( \frac{c}{2}\right)^{1/3}$$
from which we deduce that $c=16 \sqrt{3}/27$.  This is the maximum value of $f$ in the given region.
The minimum value may be worked out similarly.
