Skip to main content

Section 4.7 Maxima/Minima Problems

Revised on 2025-04-25 with a note on Functions of More Than Two Variables.

References.

Introduction.

We have seen the significance of the gradient \(\del f\) when it is non-zero: it gives the direction of fastest increase (and decrease) of the value of \(f\text{.}\)
What happens at a point where the gradient vector vanishes? All directional derivatives vanish a such a point, as \(D_{\vec{u}} f = \del f \cdot \vec{u} = 0\text{,}\) so loosely, the function does not increase or decrease in any direction.
This suggests that \(f\) has a local maximum, local minimum or other type of critical point, just as with the case where the derivative of a function of one variable is zero. We shall see that this is so, but with some extra geometrical possibilities at critical points not seen with functions of a single variable. For now, the discussion is for a function of two variables, but most of the ideas extend straightforwardly to functions of three or more variables.

Topics.

Subsection 4.7.1 Local Extrema and Critical Points

Definition 4.7.1.

A function \(f\) of two variables has a local maximum at point \((a,b)\) if \(f(x,y) \leq f(a,b)\) when \((x,y)\) is near \((a,b)\) (in the sense that this is true for all points within some ball with center \((a,b)\)). The number \(f(a,b)\) is a local maximum value.
A local minimum at \((a,b)\) and the local minimum value there are defined similarly in terms of \(f(x,y)\geq f(a,b)\text{.}\)
A local extremum is either a local maximum or a local minimum.

Definition 4.7.2.

A point \((a,b)\) in the domain of a funtion \(f\) of two variables is a critical point (or stationary point) if \(f_x(a,b)=f_y(a,b)=0\text{,}\) or if at least one of these partial derivatives does not exist.
Remark 4.7.3.
Strictly, this includes any point on the boundary of the domain, because strictly one or both derivatives do not exist at such a point. For this and other reasons, boundary points wil be considered separately later.

Exercise 4.7.4.

Check that the functions
\begin{align*} f_1(x,y)=x^2+y^2, \amp f_2(x,y)=-x^2-y^2,\\ f_3(x,y)=x^2-y^2, \amp f_4(x,y)=xy \end{align*}
each have a single critical point, at \((0,0)\text{.}\) Which have local minima, which have local maxima, and which have neither? What about the critical points of \(f_5(x,y)=x^2\text{?}\)
The disk requirement is for the same reason that a function of one variable can have a local extremum at an endpoint of its domain even though \(f' \neq 0\) there.
Note that if we freeze one variable (\(x=0\) or \(y=0\)), each of the resulting functions of a single variable has a local extremum, and the second derivative test tells us which it is. However, something new happens in the last two cases, and a modified second derivative test helps:

Notes on the Second Derivative Test.

  1. Once \(D>0\) those two second derivatives must be non-zero and of the same sign, so all possibilities are covered above.
  2. When \(D \lt 0 \text{,}\) the point is called a saddle point, as in the last two of the four examples above.
  3. To see why there is no conclusion when \(D = 0\text{,}\) consider examples like \(f(x,y)=\pm x^4 \pm y^4\text{.}\)
  4. \(D\) is given by the determinant formula
    \begin{align*} D = \left| \begin{array}{cc}f_{xx} \amp f_{xy}\\ f_{yx} \amp f_{yy}\end{array}\right| \end{align*}

Caution at the Boundary of the Domain of \(f\).

This theorem says nothing about points at the boundary of the domain of \(f\text{,}\) since at such points, at least one partial derivative fails to exist.
Thus we will now next consider boundary points separately.

Subsection 4.7.2 Absolute Maximum and Minimum Values

With a continuous function of one variable on a closed interval \([a,b]\text{,}\) absolute maximum and minimum values are attained, and occur at points where \(f'=0\text{,}\) or \(f'\) does not exist, or at at endpoints. Thus typically, finding the absolute extrema only involves comparing the values of \(f\) at a finite collection of such points. With functions of two variables, closed intervals are replaced by closed, bounded domains, which have an infinite number of points at their boundary where extrema can occur regardless of how the partial derivatives behave.

Definition 4.7.7.

A bounded set in \(\mathbb{R}^2\) or \(\mathbb{R}^3\) is one that lies inside some ball \(B_R(\vec{r}_0)\text{.}\)
(This also works in \(\mathbb{R}\text{,}\) where a "ball" is an open interval \(B_R(a) = \{x: |x-a| \lt R\}\text{.}\))
And to recap some definitions from Section 4.2:

Definition 4.7.8.

A boundary point for a set is one such that every ball centered at that point is partly in that set, partly outside it.
The boundary of a set is the set of all its boundary points.
The interior of a set is the points in the set that are not on its boundary. (Thus, in contrast to boundary points, the interior points are the ones that can be surrounded by a ball lying entirely within the set.)

Remark 4.7.9.

Note that a boundary point might or might not be in the set itself:
the two set of points \(\{(x,y): x \geq 0\}\) and \(\{(x,y): x \gt 0\}\) both have the boundary points \(\{(x,y): x = 0\}\text{,}\) but the first set contains all these boundary points, while the second contains none.

Definition 4.7.10.

A closed set is one that contains all its boundary points. A set is open if it contains none of its boundary points. Many sets are neither open nor closed.
Thus there a basic strategy for finding these absolute extrema:
  1. Find the critical points of \(f\) in \(D\text{,}\) ignoring points on the boundary of \(D\text{.}\)
  2. Find the values of \(f\) at each such point.
  3. Find the extreme values of \(f\) on boundary of \(D\text{.}\)
  4. Find the largest and smallest of all these values.
However, for now, Item 3 might rely on case-by-case stategies, depending on the form of the boundary, since unlike the situation with end-points of an interval, there are usually infinitely many boundary points. Section 4.8 introduces a powerful method for finding those extrema on the boundary of a set.

Subsection 4.7.3 Functions of More Than Two Variables

For functions of three or more variables, most of the above applies with obvious modifications; in particular the necessary condition \(\del f = \vec{0}\) for a local extremum.
The main exception is that the second derivative test becomes more complicated, and requires some knowledge of linear algebra and eigenvalues to state.

Study Guide.

Study Section 4.7 of Calculus Volume 3
 5 
openstax.org/books/calculus-volume-3/pages/4-7-maxima-minima-problems
; in particular
  • All the Definitions, Theorems, Examples and Checkpoints.
  • Both the Problem Solving Strategies.
  • One or several exercises from each of the following ranges: 310–313, 314–317, 318–340, 345–347, 348–357.