Multivariable Optimisation, MATH 126 – Study Notes
offline

Difficulty: Intermediate | Prerequisites: Partial derivatives (MATH 126 Midterm 1 material), familiarity with single-variable max/min from MATH 125.

This covers the core optimisation toolkit for functions of two variables: finding critical points, classifying them with the Second Derivative Test, and locating absolute extrema on closed bounded regions. These are the techniques you need when a problem says "find the maximum" or "find the minimum" of a surface, and they appear on nearly every MATH 126 midterm. If you are comfortable taking partial derivatives and setting up systems of equations, you are ready for this material.


TL;DR

To optimise a multivariable function, first find where both partial derivatives are zero (critical points), then use the Second Derivative Test (the D-value test) to classify each one. On a closed bounded region, also check the boundary, because the Extreme Value Theorem guarantees an absolute max and min exist there.

Key Terms

Critical point

A point (a, b) where both partial derivatives are zero: f_x(a, b) = 0 and f_y(a, b) = 0. In simple terms, this is where the surface levels off in every direction, like the top of a hill or the bottom of a bowl (or a saddle).

Second Derivative Test (D-value test)

A classification method using the discriminant D = f_xx · f_yy − (f_xy)² evaluated at a critical point. Think of it as the multivariable version of checking whether a single-variable critical point is a max or min by looking at the second derivative.

Discriminant (D)

The quantity D = f_xx(a, b) · f_yy(a, b) − [f_xy(a, b)]². This single number, combined with the sign of f_xx, tells you the nature of the critical point. Sometimes called the "Hessian determinant."

Saddle point

A critical point where D < 0. The surface curves upward in one direction and downward in another, like a horse saddle or a Pringles crisp. Neither a local max nor a local min.

Local maximum

A critical point where D > 0 and f_xx < 0. The surface curves downward in all directions from this point.

Local minimum

A critical point where D > 0 and f_xx > 0. The surface curves upward in all directions from this point.

Absolute (global) extrema

The largest and smallest values a function takes on a given region, including boundary points. Guaranteed to exist on a closed, bounded set by the Extreme Value Theorem.

Closed bounded region

A region that includes its boundary and fits inside some large circle. Think of it as a fenced-off area with no gaps in the fence and no part stretching to infinity. The Extreme Value Theorem applies here.

Lagrange multipliers

A technique for finding extrema subject to a constraint g(x, y) = k. Covered elsewhere in MATH 126, but relevant when the boundary of your region is defined by an equation like x² + y² = 3.

Core Content: Critical Points and the Second Derivative Test

Finding critical points

  • Compute both partial derivatives f_x and f_y.

  • Set f_x = 0 and f_y = 0 simultaneously.

  • Solve the resulting system of equations for x and y. Factor where possible.

Classifying with the Second Derivative Test

Once you have a critical point (a, b):

  • Compute f_xx, f_yy, and f_xy.

  • Calculate D = f_xx(a, b) · f_yy(a, b) − [f_xy(a, b)]².

  • If D > 0 and f_xx < 0: local maximum.

  • If D > 0 and f_xx > 0: local minimum.

  • If D < 0: saddle point.

  • If D = 0: the test is inconclusive (you need other methods).

Worked example: f(x, y) = 5 − x⁴ + 2x² − y²

This is Problem 1 from the mock midterm.

Step 1: Find partial derivatives.

  • f_x = −4x³ + 4x

  • f_y = −2y

Step 2: Set both equal to zero.

From f_y = −2y = 0, we get y = 0.

From f_x = −4x³ + 4x = 0, factor: −4x(x² − 1) = 0, so x = 0, x = 1, or x = −1.

Critical points: (0, 0), (1, 0), (−1, 0).

Step 3: Compute second derivatives.

  • f_xx = −12x² + 4

  • f_yy = −2

  • f_xy = 0

Step 4: Apply the Second Derivative Test at each point.

At (0, 0): f_xx = 4, f_yy = −2, f_xy = 0. D = (4)(−2) − 0² = −8 < 0. Saddle point.

At (1, 0): f_xx = −12 + 4 = −8, f_yy = −2, f_xy = 0. D = (−8)(−2) − 0² = 16 > 0 and f_xx = −8 < 0. Local maximum.

At (−1, 0): f_xx = −12 + 4 = −8, f_yy = −2, f_xy = 0. D = (−8)(−2) − 0² = 16 > 0 and f_xx = −8 < 0. Local maximum.

Core Content: Absolute Extrema on Closed Bounded Regions

The method (three-step procedure)

  1. Find all critical points of f inside the region D.

  1. Find the extreme values of f on the boundary of D (each boundary piece is handled separately).

  1. Compare all values from steps 1 and 2. The largest is the absolute maximum; the smallest is the absolute minimum.

This works because the Extreme Value Theorem guarantees that a continuous function on a closed, bounded set attains its absolute max and min.

Handling the boundary

Boundaries are typically made up of line segments and curves. For each piece:

  • Parametrise: express x and y in terms of one variable (or substitute one into the other using the boundary equation).

  • Reduce to a single-variable optimisation problem.

  • Find critical points of the single-variable function on the appropriate interval.

  • Evaluate at endpoints of each boundary piece as well.

Worked example: f(x, y) = xy² + 8 on D = {(x, y) | x ≥ 0, y ≥ 0, x² + y² ≤ 3}

This is Problem 2 from the mock midterm. The region is a quarter-disc of radius √3 in the first quadrant.

Step 1: Interior critical points.

  • f_x = y², f_y = 2xy.

  • Setting f_x = 0 gives y = 0. Setting f_y = 0 gives 2xy = 0, so x = 0 or y = 0.

  • The only interior critical point (satisfying x ≥ 0, y ≥ 0) is (0, 0). f(0, 0) = 8.

Step 2: Boundary pieces.

Boundary 1 (y = 0, 0 ≤ x ≤ √3): f(x, 0) = 0 + 8 = 8. Constant, so f = 8 everywhere on this segment.

Boundary 2 (x = 0, 0 ≤ y ≤ √3): f(0, y) = 0 + 8 = 8. Also constant.

Boundary 3 (the arc x² + y² = 3, x ≥ 0, y ≥ 0): substitute x = √(3 − y²).

f = √(3 − y²) · y² + 8 on 0 ≤ y ≤ √3.

To find the max, differentiate with respect to y and set to zero:

f'(y) = y(6 − 3y²) / √(3 − y²) = 0.

So y = 0 or 6 − 3y² = 0, giving y² = 2, y = √2.

When y = √2: x = √(3 − 2) = 1. f(1, √2) = 1 · 2 + 8 = 10.

Check endpoints of the arc: (√3, 0) gives f = 8, and (0, √3) gives f = 8.

Step 3: Compare all values.

All candidates: f = 8 (several points) and f = 10 at (1, √2).

Absolute minimum = 8. Absolute maximum = 10.

Formulas

D = f_{xx}(a,b) \cdot f_{yy}(a,b) - \bigl[f_{xy}(a,b)\bigr]^2

D > 0 and f_xx < 0 → local max. D > 0 and f_xx > 0 → local min. D < 0 → saddle point. D = 0 → inconclusive.

For absolute extrema on a closed bounded region: evaluate f at all interior critical points, at all boundary critical points, and at all corner or junction points. Compare.

Real-World Applications

Optimising a function of several variables is the mathematical backbone of engineering design problems: minimising material cost for a given structural strength, maximising signal strength over an antenna array, or finding the most efficient shape for a heat exchanger. In machine learning, training a model means minimising a loss function over thousands of parameters, which is the same idea scaled up.

Common Misconceptions

  • Students often forget to check f_xx after computing D. D > 0 alone does not tell you max vs min. You must also look at the sign of f_xx (or equivalently f_yy).

  • Confusing "critical point" with "extreme value." A saddle point is a critical point but not an extremum.

  • On the absolute extrema problem, students frequently forget to check the boundary. Interior critical points alone are not enough. The max or min often occurs on the boundary.

  • When parametrising a curved boundary like x² + y² = 3, students sometimes forget to check the endpoints of the parametrisation (where the curve meets the axes, for example).

Why It Matters / Exam Flags

⚠️ The Second Derivative Test is tested on virtually every MATH 126 midterm. Know the formula for D cold.

⚠️ Absolute extrema problems always require checking the boundary. Expect at least one boundary piece that requires substitution or parametrisation.

⚠️ The exam requires exact form (e.g. √2 not 1.414). Do not convert to decimals unless the problem explicitly says to.

⚠️ Show all work. "Find and classify" means you must state D, state f_xx, and write out the classification for each point. Skipping the justification loses marks.

Quick Self-Test

  1. True or False: If D = 0 at a critical point, the point is a saddle point.
    False. D = 0 means the test is inconclusive. You cannot classify the point with this test alone.

  1. Fill in the blank: To find absolute extrema on a closed bounded region, you must check critical points in the ______ and extreme values on the ______.
    Interior; boundary.

  1. True or False: If D > 0, the critical point is a local maximum.
    False. You also need f_xx < 0 for a local max. If f_xx > 0, it is a local min.

  1. True or False: A saddle point is a critical point.
    True. Both partial derivatives are zero there; the surface just curves up in one direction and down in another.

  1. Fill in the blank: The discriminant formula is D = f_xx · f_yy − ______.
    (f_xy)².

Practice Q&A

Q: Find all critical points of g(x, y) = x³ − 3x + y² − 2y and classify each.

A: g_x = 3x² − 3 = 0 → x = ±1. g_y = 2y − 2 = 0 → y = 1. Critical points: (1, 1) and (−1, 1). g_xx = 6x, g_yy = 2, g_xy = 0. At (1, 1): D = 12 · 2 − 0 = 12 > 0, g_xx = 6 > 0 → local min. At (−1, 1): D = (−6)(2) − 0 = −12 < 0 → saddle point.

Q: Explain why you must check the boundary when finding absolute extrema on a closed region.

A: The Extreme Value Theorem guarantees a continuous function on a closed, bounded set attains its absolute max and min. These can occur at interior critical points or on the boundary. Skipping the boundary means you may miss the actual global max or min.

Q: For f(x, y) = xy² + 8 on the quarter-disc x ≥ 0, y ≥ 0, x² + y² ≤ 3, how many boundary pieces must you check?

A: Three. The segment along y = 0 (0 ≤ x ≤ √3), the segment along x = 0 (0 ≤ y ≤ √3), and the arc x² + y² = 3 in the first quadrant.

Q: If D > 0 and f_yy > 0 at a critical point, what is the classification?

A: Local minimum. When D > 0, f_xx and f_yy have the same sign (since D = f_xx · f_yy − (f_xy)² > 0 forces them to agree in sign). So f_yy > 0 means f_xx > 0 as well, giving a local min.

Connections to Other Topics

This material connects directly to Lagrange multipliers, which is the technique for constrained optimisation (finding extrema on a specific curve rather than a region). If the boundary of your region is defined by g(x, y) = k, Lagrange multipliers give you the boundary critical points without parametrisation.

The Second Derivative Test is the multivariable extension of the concavity test from MATH 124/125. The discriminant D plays the role that f''(x) plays in single-variable calculus, but with the added complication of mixed partials.

Double integrals (covered in the companion notes) often use these same regions, so understanding how to describe and parametrise boundary curves carries over directly.

Related Terms / Search Tags

critical points multivariable, second derivative test two variables, D-value test, discriminant Hessian, saddle point classification, local max min multivariable, absolute extrema closed region, Extreme Value Theorem multivariable, boundary analysis optimisation, quarter-disc region, MATH 126 UW midterm 2, Calculus III optimisation, f_xx f_yy f_xy, finding max and min of surfaces