Theorem 4.1 (First Derivative Test). If f has a local extremum at an interior point a And ∇f(a) exists, then ∇f(a)=0.
Points where ∇f=0 are called critical points (or stationary points).
Remark. Not all critical points are extrema. A critical point can be a local minimum, local maximum, Or saddle point. The second derivative test (Section 4.2) distinguishes these cases.
4.2 Second Derivative Test
Theorem 4.2 (Second Derivative Test). Let f have continuous second partial derivatives near a Critical point (a,b) with fx(a,b)=fy(a,b)=0. Let
D=fxx(a,b)fyy(a,b)−[fxy(a,b)]2
Be the Hessian determinant. Then:
If D>0 and fxx(a,b)>0: local minimum.
If D>0 and fxx(a,b)<0: local maximum.
If D<0: saddle point.
If D=0: the test is inconclusive.
Proof. By Taylor”s theorem to second order, for small h,k:
f(a+h,b+k)−f(a,b)=21[fxxh2+2fxyhk+fyyk2]+R2
Where the remainder R2=o(h2+k2) and all partials are evaluated at (a,b). The sign of the Right-hand side is determined by the quadratic form
Q(h,k)=fxxh2+2fxyhk+fyyk2=(hk)H(hk)
Where H=(fxxfxyfxyfyy) is the Hessian matrix.
By Sylvester’s criterion for 2×2 symmetric matrices:
If det(H)=D>0 and fxx>0Then H is positive definite, so Q>0 for all (h,k)=(0,0)Giving a local minimum.
If det(H)=D>0 and fxx<0Then H is negative definite, so Q<0 for all (h,k)=(0,0)Giving a local maximum.
If det(H)=D<0Then H is indefinite, so Q takes both positive and negative values, giving a saddle point.
When D=0The quadratic form is degenerate and the sign is determined by higher-order terms. ■
4.3 Lagrange Multipliers
Theorem 4.3 (Method of Lagrange Multipliers). To find the extrema of f(x,y,z) subject to the Constraint g(x,y,z)=0Solve the system:
∇f=λ∇g,g=0
More generally, for k constraints g1=0,…,gk=0:
∇f=λ1∇g1+⋯+λk∇gk
Proof (single constraint, geometric justification). Let M=(x,y,z):g(x,y,z)=0 be the constraint surface. If f has a local extremum on M at pThen the directional derivative Dvf(p)=0 for every tangent Vector v to M at p. Since ∇f(p)⋅v=0 for all Such vThe gradient ∇f(p) must be orthogonal to the tangent space of M At p. But the tangent space of M is orthogonal to ∇g(p) (by the implicit Function theorem). Therefore ∇f(p) must be parallel to ∇g(p)I.e., ∇f(p)=λ∇g(p) for some scalar λ. ■
4.4 Worked Example
Problem. Find the maximum of f(x,y)=xy subject to x2+y2=1.
Solution. Set g(x,y)=x2+y2−1. The Lagrange multiplier equations:
∇f=λ∇g⟹(y,x)=λ(2x,2y)
This gives y=2λx and x=2λy. Multiplying: xy=4λ2xy.
Case 1: xy=0. Then 4λ2=1So λ=±1/2.
λ=1/2: y=xAnd x2+x2=1So x=±1/2. Points: (1/2,1/2) and (−1/2,−1/2) with f=1/2.
λ=−1/2: y=−xAnd x2+x2=1So x=±1/2. Points: (1/2,−1/2) and (−1/2,1/2) with f=−1/2.
Case 2: xy=0. Then either x=0 or y=0. From the constraint: (0,±1) or (±1,0) with f=0.
Maximum: f=1/2 at (±1/2,±1/2). Minimum: f=−1/2 at (±1/2,∓1/2). ■
4.5 Additional Worked Examples
Problem. Find and classify all critical points of f(x,y)=x4+y4−4xy.
Solution
Compute the gradient:
∇f=(4x3−4y,4y3−4x)
Set ∇f=(0,0):
x3=y,y3=x
Substituting y=x3 into y3=x: (x3)3=xI.e., x9=xGiving x(x8−1)=0. So x=0 or x=±1.
x=0: y=0. Critical point: (0,0).
x=1: y=1. Critical point: (1,1).
x=−1: y=−1. Critical point: (−1,−1).
Second derivatives: fxx=12x2, fyy=12y2, fxy=−4.
At (0,0): D=0⋅0−16=−16<0. Saddle point.
At (1,1): D=12⋅12−16=144−16=128>0 and fxx=12>0. Local minimum with f(1,1)=1+1−4=−2.
At (−1,−1): D=12⋅12−16=128>0 and fxx=12>0. Local minimum with f(−1,−1)=1+1−4=−2. ■
Problem. Find and classify all critical points of f(x,y)=x3+y3−3xy.
Solution
Compute the gradient:
∇f=(3x2−3y,3y2−3x)
Set ∇f=(0,0):
3x2−3y=0⟹y=x2,3y2−3x=0⟹y2=x
Substituting: (x2)2=xSo x4−x=0Giving x(x3−1)=0So x=0 or x=1.
x=0: y=0. Critical point: (0,0).
x=1: y=1. Critical point: (1,1).
Second derivatives: fxx=6x, fyy=6y, fxy=−3.
At (0,0): D=fxxfyy−fxy2=0⋅0−9=−9<0. Saddle point.
At (1,1): D=6⋅6−9=27>0 and fxx=6>0. Local minimum with f(1,1)=−1. ■
Problem. Find the point on the plane x+2y+3z=6 closest to the origin.
Solution
Minimise f(x,y,z)=x2+y2+z2 subject to g(x,y,z)=x+2y+3z−6=0.
∇f=λ∇g:
(2x,2y,2z)=λ(1,2,3)
This gives x=λ/2, y=λ, z=3λ/2. Substituting into the constraint:
2λ+2λ+29λ=6⟹2λ+4λ+9λ=6⟹7λ=6⟹λ=76
Therefore x=3/7, y=6/7, z=9/7. The closest point is (3/7,6/7,9/7) with Distance 9/49+36/49+81/49=126/49=7314. ■
4.6 Multiple Constraints
Problem. Maximise f(x,y,z)=xyz subject to x+y+z=1 and x2+y2+z2=1/3.
Solution
Set g1=x+y+z−1 and g2=x2+y2+z2−1/3. The Lagrange multiplier system is:
∇f=λ1∇g1+λ2∇g2
(yz,xz,xy)=λ1(1,1,1)+λ2(2x,2y,2z)
This gives three equations:
yz=λ1+2λ2x,xz=λ1+2λ2y,xy=λ1+2λ2z
Subtracting the first two: z(y−x)=2λ2(x−y)Giving (y−x)(z+2λ2)=0.
Similarly, (z−y)(x+2λ2)=0 and (x−z)(y+2λ2)=0.
If x=y=z: From g1: 3x=1So x=1/3. From g2: 3(1/9)=1/3. This satisfies both constraints.
At (1/3,1/3,1/3): f=1/27.
If x=y: Then z+2λ2=0. If also y=z: x+2λ2=0So x=z.
With x=z: from x+y+z=1: 2x+y=1. From 2x2+y2=1/3: Substituting y=1−2x: 6x2−4x+2/3=0I.e., (3x−1)2=0So x=1/3y=1/3. This reduces to the symmetric case.
Therefore the only critical point is (1/3,1/3,1/3)Which gives f=1/27.
Since the constraint set is compact (intersection of a plane and a sphere in R3), the Extreme value theorem guarantees both a maximum and minimum exist. The maximum of xyz is 1/27 at (1/3,1/3,1/3). ■
4.7 Common Pitfalls
:::caution Common Pitfalls
Lagrange multipliers find candidates only. The method produces candidates for constrained extrema but does not guarantee they are extrema. Always evaluate f at all candidates and use additional reasoning (e.g., compactness of the constraint set via the extreme value theorem) to determine which gives the max/min.
Boundary vs. Interior. For unconstrained problems on a closed, bounded domain, check both interior critical points and boundary points separately.
Degenerate Hessian. When the Hessian determinant D=0The second derivative test is inconclusive. Use higher-order Taylor expansions or direct analysis of the function near the critical point.
Non-normalised constraint gradients. Ensure the constraint functions are written in the form g=0; multiplying g by a constant changes λ but not the critical points.