notesonly.in

One notebook for every subject — open it anywhere.

Log in

Maxima and Minima of Two Variables: A Complete Guide

Finding the highest or lowest point of a curve is a classic single-variable problem: set the derivative to zero and check the second derivative. But most real quantities depend on two inputs at once — a company’s profit depends on both price and advertising, and the temperature on a metal plate depends on both x and y. To find peaks and valleys on such surfaces, you need the two-variable version of optimization.

The idea is the same but doubled: at a local maximum or minimum, the surface must be flat in every direction, so both first partial derivatives are zero. Points where fx = 0 and fy = 0 are called critical points. Then a single number — the discriminant D = fxx · fyy − (fxy)² — tells you whether the critical point is a peak, a valley, or a saddle where the surface rises in one direction and falls in another.

Key Concepts

  • Critical point: a point (a, b) with fx(a, b) = 0 and fy(a, b) = 0 (or where a partial derivative does not exist).
  • Discriminant: D = fxx(a, b) · fyy(a, b) − [fxy(a, b)]² — the determinant of the Hessian matrix of second partials.
  • Saddle point: a critical point that is neither a max nor a min — like a mountain pass, rising along one path and falling along another.
  • Local vs global: the test finds local extrema; global ones may also sit on the boundary of the domain.

Formulas

  • Critical points: solve fx = 0 and fy = 0 simultaneously.
  • Second-derivative test: D > 0 and fxx > 0 → local minimum; D > 0 and fxx < 0 → local maximum; D < 0 → saddle point; D = 0 → the test is inconclusive.

Worked Example

Find and classify the critical points of f(x, y) = x² + y² − 4x + 2y + 5.

  1. First partials. fx = 2x − 4 = 0 gives x = 2. fy = 2y + 2 = 0 gives y = −1. Critical point: (2, −1).
  2. Second partials. fxx = 2, fyy = 2, fxy = 0.
  3. Discriminant. D = (2)(2) − 0² = 4 > 0, and fxx = 2 > 0, so this is a local minimum.
  4. Minimum value. f(2, −1) = 4 + 1 − 8 − 2 + 5 = 0. The lowest point of the surface is (2, −1, 0).
  5. Cross-check by completing the square: f = (x − 2)² + (y + 1)², which is clearly ≥ 0 with minimum 0 at (2, −1). It agrees.

Common Misconceptions

  • “fx = 0 and fy = 0 guarantees a max or min.” Saddle points satisfy the same equations — always apply the D test before concluding.
  • “D > 0 always means maximum.” The sign of fxx decides: positive → minimum, negative → maximum.
  • “If D = 0 there is no extremum.” D = 0 means the test says nothing at all; the point could be a max, min, or saddle and needs other methods.

Real-World Applications

  • Business: maximizing profit as a function of price and production level.
  • Engineering: minimizing material cost or energy use under design constraints.
  • Machine learning: a loss function depends on many parameters; training is the search for its minima.
  • Physics: equilibrium positions of a system are minima of its potential energy.

Optimization in two variables follows a fixed recipe: find critical points by setting both first partials to zero, compute D = fxxfyy − (fxy)², and read off the verdict — minimum, maximum, or saddle. The discriminant does the work that the single second derivative does on a curve.