The previous example shows how to find local extrema of a function of two
variables, f(x,y) that is free of constraints. Normally, though, there
are ``real world'' considerations for optimizing functions which can cause
you to reject one extrema in favor of another extrema which may not be the
absolute maximum or minimum of the function. For example, with our profit
function above, P(x,y), we probably also have a budget function which
shows the expense of producing x of product A and y of product B. This
cost function, C(x,y), is probably constrained to be less than some value
(our budget,) say C0. Thus, we need to find the production to maximize
profit subject to the constraint that . This means that if
our maximum profit occurs at a point (x0,y0) which is outside of our
constrained region, then we must reject this extremum.