Extrema and Constrained Extrema

Extrema of Multivariable Functions

Extrema of a Multivariable Function

Let z=f(x,y)z = f(x, y) be defined on a neighborhood of P0(x0,y0)P_0(x_0, y_0). If for every point P(x,y)≠P0P(x, y) \neq P_0 in that neighborhood,

f(x,y)<f(x0,y0)(or f(x,y)>f(x0,y0))f(x, y) < f(x_0, y_0) \quad \text{(or } f(x, y) > f(x_0, y_0) \text{)}

then ff has a local maximum (or local minimum) at P0P_0, and P0P_0 is called a maximum point (or minimum point). Maxima and minima together are called extrema.

Necessary Condition — Fermat’s Theorem

Theorem1

Fermat’s theorem (necessary condition): if z=f(x,y)z = f(x, y) has partial derivatives at (x0,y0)(x_0, y_0) and attains an extremum there, then

fx(x0,y0)=0,fy(x0,y0)=0f_x(x_0, y_0) = 0, \quad f_y(x_0, y_0) = 0

For an nn-variable function, all first partials vanish at an extremum:

fxi(P0)=0(i=1,2,…,n)f_{x_i}(P_0) = 0 \quad (i = 1, 2, \ldots, n)

Critical Points and Stationary Points

Critical Point / Stationary Point

A point (x,y)(x, y) where both first partial derivatives vanish, i.e.

fx(x,y)=0,fy(x,y)=0f_x(x, y) = 0, \quad f_y(x, y) = 0

is called a stationary point (or critical point). More generally, any point with ∇f=0⃗\nabla f = \vec{0} is a stationary point.

Saddle Point

Saddle Point

A stationary point that is neither a local maximum nor a local minimum is called a saddle point—the surface goes up along some directions and down along others, like a horse’s saddle.

Second-Derivative Test

Hessian Matrix

The Hessian matrix of z=f(x,y)z = f(x, y) at a stationary point is

H=(fxxfxyfyxfyy)H = \begin{pmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{pmatrix}

Theorem2

Second-derivative test: let (x0,y0)(x_0, y_0) be a stationary point, and set

A=fxx(x0,y0),B=fxy(x0,y0),C=fyy(x0,y0),Δ=AC−B2A = f_{xx}(x_0,y_0), \quad B = f_{xy}(x_0,y_0), \quad C = f_{yy}(x_0,y_0), \quad \Delta = AC - B^2

  1. If Δ>0\Delta > 0 and A>0A > 0: local minimum.
  2. If Δ>0\Delta > 0 and A<0A < 0: local maximum.
  3. If Δ<0\Delta < 0: saddle point.
  4. If Δ=0\Delta = 0: the test is inconclusive.

Worked Examples: Unconstrained Extrema

Example 1: Second-Derivative Test

Find the extrema of f(x,y)=x2+y2f(x, y) = x^2 + y^2.

extremastationary pointsecond test

Approach:

Classify a stationary point by evaluating the second partial derivatives and the discriminant built from them.

Steps:

  1. Stationary point: fx=2x=0f_x = 2x = 0, fy=2y=0f_y = 2y = 0, so (0,0)(0,0).
  2. Second derivatives: fxx=2,fxy=0,fyy=2f_{xx}=2, f_{xy}=0, f_{yy}=2
  3. Δ=4−0=4>0\Delta = 4 - 0 = 4 > 0, and A=2>0A = 2 > 0: local minimum.

Answer: local (and global) minimum 00 at (0,0)(0,0).

Example 2: Saddle Point

Find the extrema of f(x,y)=x2−y2f(x, y) = x^2 - y^2.

extremasaddle pointsecond test

Approach:

A negative discriminant means the Hessian is indefinite, so the point is a saddle rather than an extremum.

Steps:

  1. Stationary point: fx=2x=0f_x = 2x = 0, fy=−2y=0f_y = -2y = 0, so (0,0)(0,0).
  2. fxx=2,fxy=0,fyy=−2f_{xx}=2, f_{xy}=0, f_{yy}=-2
  3. Δ=−4<0\Delta = -4 < 0: saddle point.

Answer: (0,0)(0,0) is a saddle point—not an extremum.

Constrained Extrema and Lagrange Multipliers

Constrained Extremum

Finding the extremum of z=f(x,y)z = f(x, y) (the objective function) subject to the constraint φ(x,y)=0\varphi(x, y) = 0 is called a constrained extremum problem. In general:

extreme f(x1,…,xn)subject to φi(x1,…,xn)=0(i=1,…,m)\text{extreme } f(x_1, \ldots, x_n) \quad \text{subject to } \varphi_i(x_1, \ldots, x_n) = 0 \quad (i = 1, \ldots, m)

Lagrange Multiplier Method (Single Constraint)

Theorem3

To find possible extrema of f(x,y)f(x, y) subject to φ(x,y)=0\varphi(x, y) = 0, form the Lagrangian:

L(x,y,λ)=f(x,y)+λφ(x,y)L(x, y, \lambda) = f(x, y) + \lambda \varphi(x, y)

where λ\lambda is the Lagrange multiplier. Set all first partials to zero:

{Lx=fx+λφx=0Ly=fy+λφy=0Lλ=φ(x,y)=0\begin{cases} L_x = f_x + \lambda \varphi_x = 0 \\ L_y = f_y + \lambda \varphi_y = 0 \\ L_\lambda = \varphi(x, y) = 0 \end{cases}

Solving this system gives the candidate constrained extremum points.

Intuition: at a constrained extremum, the gradient of the objective function is parallel to the gradient of the constraint—∇f=−λ∇φ\nabla f = -\lambda \nabla \varphi—so the level curves of ff are tangent to the constraint curve.

Example 3: Lagrange Multipliers

Maximize f(x,y)=x+yf(x, y) = x + y subject to x2+y2=2x^2 + y^2 = 2.

constrained extremumLagrange multipliercircle

Approach:

To extremize a function subject to a constraint, build the Lagrangian and set all of its partial derivatives to zero together with the constraint equation.

Steps:

  1. Lagrangian: L=x+y+λ(x2+y2−2)L = x + y + \lambda(x^2 + y^2 - 2)
  2. Set partials to zero: Lx=1+2λx=0L_x = 1 + 2\lambda x = 0 Ly=1+2λy=0L_y = 1 + 2\lambda y = 0 Lλ=x2+y2−2=0L_\lambda = x^2 + y^2 - 2 = 0
  3. From the first two: x=y=−12λx = y = -\frac{1}{2\lambda}
  4. Substitute: 2(−12λ)2=2⇒λ2=14⇒λ=±122\left(-\frac{1}{2\lambda}\right)^2 = 2 \Rightarrow \lambda^2 = \frac14 \Rightarrow \lambda = \pm\frac12
  5. λ=−12\lambda = -\frac12 gives x=y=1x=y=1; λ=12\lambda = \frac12 gives x=y=−1x=y=-1
  6. f(1,1)=2f(1,1) = 2, f(−1,−1)=−2f(-1,-1) = -2

Answer: maximum 22 at (1,1)(1,1); minimum −2-2 at (−1,−1)(-1,-1).


Summary

Symbols Used in This Article

SymbolTypePronunciation/ExplanationMeaning in This Article
fx,fyf_x, f_yPartial derivativef sub x, f sub yFirst partial derivatives
A,B,CA, B, CNumberA, B, Cfxx,fxy,fyyf_{xx}, f_{xy}, f_{yy} at a stationary point
Δ\DeltaGreek letterDeltaThe discriminant AC−B2AC - B^2
λ\lambdaGreek letterLambdaThe Lagrange multiplier
LLFunctionLThe Lagrangian function
φ\varphiGreek letterphiThe constraint function
∇f\nabla fVectornabla fThe gradient of ff

Found an issue with this content?

Tell us what could be improved.