Skip to content
Tutorials Center
My learning

Topics

Lesson 20 of 39 · Optimization in Several Variables

Absolute Extrema on Closed Regions

Find the absolute maximum and minimum of f(x, y) on a closed, bounded region by checking interior critical points and the boundary, with SymPy checks.

A local maximum is the highest point in its neighborhood. An absolute (or global) maximum is the highest value on the whole region you care about. Engineers usually want the absolute answer: the hottest point on a plate, the cheapest design within limits.

There is a guarantee that makes the search possible. The Extreme Value Theorem says that a continuous function on a closed and bounded region (one that includes its boundary and does not run off to infinity) always attains an absolute maximum and an absolute minimum. The question is only where.

The closed-region method

  1. Find all critical points of f in the interior and record f there.
  2. Find the largest and smallest values of f on the boundary. This is a one-variable problem (or several, if the boundary has several pieces).
  3. Compare every candidate value. The biggest is the absolute maximum, the smallest is the absolute minimum.

You do not need the second derivative test here. You only compare numbers.

Example 1: a disk

Find the absolute extrema of f(x, y) = x² + 2y² - x on the closed disk x² + y² ≤ 1.

Interior. fx = 2x - 1 = 0 gives x = 1/2. fy = 4y = 0 gives y = 0. The point (1/2, 0) lies inside the disk, and f(1/2, 0) = 1/4 - 1/2 = -1/4.

Boundary. Parametrize the circle: x = cos t, y = sin t. Then

Text
g(t) = cos²t + 2 sin²t - cos t = 1 + sin²t - cos t = 2 - cos²t - cos t

Let c = cos t, which ranges over [-1, 1]. Then h(c) = 2 - c² - c, and h'(c) = -2c - 1 = 0 gives c = -1/2. Evaluate:

c h(c)
-1 (endpoint) 2 - 1 + 1 = 2
-1/2 (critical) 2 - 1/4 + 1/2 = 9/4
1 (endpoint) 2 - 1 - 1 = 0

Compare all candidates: -1/4 (interior), 2, 9/4, 0.

  • Absolute maximum: 9/4 at the points with cos t = -1/2, that is (-1/2, ±√3/2).
  • Absolute minimum: -1/4 at (1/2, 0).

Notice the minimum is in the interior and the maximum is on the boundary. Either can happen.

Python Verify the disk example with SymPy and a grid

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The grid search is a sanity check, not a proof. It should land very near 2.25 and -0.25.

Example 2: a rectangle with four edges

Find the absolute extrema of f(x, y) = x² - 2xy + 2y on the rectangle 0 ≤ x ≤ 3, 0 ≤ y ≤ 2.

Interior. fx = 2x - 2y = 0 and fy = -2x + 2 = 0 give x = 1, y = 1. So f(1, 1) = 1 - 2 + 2 = 1.

Boundary. The rectangle has four edges. On each, f becomes a function of one variable, and you also check the four corners.

Edge Reduced function Critical point Values to check
y = 0, 0 ≤ x ≤ 3 x² x = 0 f(0,0) = 0, f(3,0) = 9
y = 2, 0 ≤ x ≤ 3 x² - 4x + 4 x = 2 f(2,2) = 0, f(0,2) = 4, f(3,2) = 1
x = 0, 0 ≤ y ≤ 2 2y none f(0,0) = 0, f(0,2) = 4
x = 3, 0 ≤ y ≤ 2 9 - 4y none f(3,0) = 9, f(3,2) = 1

All candidates: 1, 0, 9, 0, 4, 1. The absolute maximum is 9 at (3, 0) and the absolute minimum is 0, attained at (0, 0) and at (2, 2).

A function can reach its absolute minimum at more than one point. Report every point where the extreme value occurs, or say clearly that you are reporting the value only.

Python A boundary-walking extremum finder

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Unbounded regions

If the region is not closed and bounded, the guarantee disappears. The function f(x, y) = x + y has no maximum on the plane, and 1/(x² + y²) on 0 < x² + y² ≤ 1 has no maximum because the origin is excluded. In such cases you analyze behavior at infinity and near missing points, then argue directly.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which condition guarantees that a continuous f(x, y) has an absolute maximum and minimum?

    This is the Extreme Value Theorem: closed and bounded regions (which include their boundary) give attained extremes for continuous functions.
  2. 2. In the closed-region method, how do you decide between interior critical points and boundary candidates?

    You list all candidate points, evaluate f at each and compare. No second derivative test is needed.
  3. 3. On the closed disk x² + y² ≤ 1, the function f = x² + 2y² - x has absolute maximum 9/4. Where does it occur?

    The boundary reduction has its maximum where cos t = -1/2, which gives x = -1/2 and y = ±√3/2.
  4. 4. The region 0 < x² + y² ≤ 1 (origin removed) is not closed. What can go wrong?

    The Extreme Value Theorem no longer applies, so a continuous function can approach a supremum without reaching it, such as 1/(x² + y²).

Summary

  • A continuous function on a closed, bounded region has an absolute maximum and minimum.
  • Collect candidates: interior critical points, boundary critical points, and corners.
  • Evaluate f at all candidates and compare; the largest and smallest values win.
  • Reduce each boundary piece to one variable by parametrizing or substituting.
  • For constrained boundaries given by an equation, Lagrange multipliers offer another route.

Next: Lagrange Multipliers