You want to equate the first partials to zero and solve the resulting system to find the critical points:

Solve the resulting system to find any critical points in the given region.

Now you want to use the second partials test for relative extrema:

Let be a critical point of and suppose and are continuous in a rectangular region containing .

Let .

i) If and , then is a relative minimum.

ii) If and , then is a relative maximum.

iii) If , then is not an extremum.

iv) If , then no conclusion can be drawn concerning a relative extremum.