Maximization in Two Variables I have not yet had the privilege of studying multivariable calculus, but I have made an educated guess about how to find the minimum or maximum of a function with two variables, for example, $x$ and $y$.
Since, in three dimensions, a minimum or maximum would be represented by a tangent plane with no slope in any direction, could I treat $y$ as a constant and differentiate $z$ with respect to $x$, then treat $x$ as a constant and differentiate with respect to $y$, and find the places where both of these two are equal to zero?
Sorry if this is just a stupid assumption... it may be one of those things that just seems correct but is actually wrong.
 A: In fact you got quite a good "guess". When it comes to finding maxima and minima of a function $f:\mathbb{R}^2 \to \mathbb{R}$, you begin by finding the critical points which, as you said, are obtained by solving the system:
$$\begin{cases} f'_x(x_0, y_0) = 0 \\ f'_y(x_0, y_0) = 0\end{cases}$$
The solution(s), $(x_0, y_0)$, is either going to be maxima, minima or  saddlepoint. 
You determine which one it is by studying the Hessian matrix evaluated at that point. 
I'm sure you will get to it when you start doing multivariable calculus. Great guess, however!
A: That's actually a necessary condition for well-behaved functions, but it's not sufficient.
Classical counterexample:
$$
f(x,y) = x^2 - y^2
$$
satisfies your condition in $(0,0)$ but it's not a maximum (nor minimum), it's a saddle point.

A: My suggestions are:


*

*Check second-order derivatives as well to make sure the point you get is a local maximum and minimum

*Then also check the boundary points (if there is any), because values at boundary could be larger than local maximum or smaller than local minimum

*Check the function behavior as it goes to infinity - you'll probably find values there larger than local maximum or smaller than local minimum

*Also pay attention to where derivatives do not exist


I also put a similar answer in this post in case you are interested in it.
