Quiz 2

Critical Points & Steepest Ascent/Descent

1434 words
7 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Critical Points & Steepest Ascent/Descent ## 🎯 Learning Objectives After this topic you will be able to: - Find critical points of $f(x,y)$ by solving $\nabla f = \mathbf{0}$ - Classify critical points using the second derivative test (Hessian) - Determine the direction of steepest ascent and descent - Use the gr...

Critical Points & Steepest Ascent/Descent

🎯 Learning Objectives

After this topic you will be able to:
  • Find critical points of f(x,y)f(x,y) by solving f=0\nabla f = \mathbf{0}
  • Classify critical points using the second derivative test (Hessian)
  • Determine the direction of steepest ascent and descent
  • Use the gradient to find maxima and minima

📋 Prerequisites

  • Gradient (Week 9) — f\nabla f must be zero at interior extrema
  • Tangent Planes (this week) — horizontal tangent plane at critical point
  • Partial Derivatives (Week 9) — computing first and second derivatives

1. Intuition: Flat Spots on a Surface

A critical point of f(x,y)f(x,y) is where the tangent plane is horizontal (f=0\nabla f = \mathbf{0}). At such points, the function could have:
  • Local maximum (peak)
  • Local minimum (valley)
  • Saddle point (mountain pass — max in one direction, min in another) (Diagram)

2. Finding Critical Points

Definition (Critical Point). A point a\mathbf{a} is a critical point of ff if f(a)=0\nabla f(\mathbf{a}) = \mathbf{0} or f\nabla f does not exist. For f(x,y)f(x,y), solve:
fx(x,y)=0,fy(x,y)=0f_x(x,y) = 0, \quad f_y(x,y) = 0
Example 1: Finding critical points
f(x,y)=x2+y24x+6y+13f(x,y) = x^2 + y^2 - 4x + 6y + 13.
fx=2x4=0x=2f_x = 2x - 4 = 0 \Rightarrow x = 2. fy=2y+6=0y=3f_y = 2y + 6 = 0 \Rightarrow y = -3.
Critical point: (2,3)(2,-3). f(2,3)=4+9818+13=0f(2,-3) = 4 + 9 - 8 - 18 + 13 = 0. Example 2: Multiple critical points
f(x,y)=x33x+y2f(x,y) = x^3 - 3x + y^2.
fx=3x23=0x=±1f_x = 3x^2 - 3 = 0 \Rightarrow x = \pm 1. fy=2y=0y=0f_y = 2y = 0 \Rightarrow y = 0.
Critical points: (1,0)(1,0) and (1,0)(-1,0).

3. Classification: Second Derivative Test

Theorem (Second Derivative Test for f(x,y)f(x,y)). Let (a,b)(a,b) be a critical point of ff. Define:
>D=fxxfyy(fxy)2=det(H)>> D = f_{xx}f_{yy} - (f_{xy})^2 = \det(H) >
where HH is the Hessian matrix.
  • If D>0D > 0 and fxx>0f_{xx} > 0: local minimum
  • If D>0D > 0 and fxx<0f_{xx} < 0: local maximum
  • If D<0D < 0: saddle point
  • If D=0D = 0: test is inconclusive Example 3: Classifying Example 1
f(x,y)=x2+y24x+6y+13f(x,y) = x^2 + y^2 - 4x + 6y + 13, critical point (2,3)(2,-3).
fxx=2f_{xx} = 2, fyy=2f_{yy} = 2, fxy=0f_{xy} = 0. D=2202=4>0D = 2\cdot2 - 0^2 = 4 > 0, fxx=2>0f_{xx} = 2 > 0local minimum. Example 4: Classifying Example 2
f(x,y)=x33x+y2f(x,y) = x^3 - 3x + y^2.
fxx=6xf_{xx} = 6x, fyy=2f_{yy} = 2, fxy=0f_{xy} = 0.
At (1,0)(1,0): D=6(1)20=12>0D = 6(1)\cdot2 - 0 = 12 > 0, fxx=6>0f_{xx}=6>0local min. At (1,0)(-1,0): D=6(1)20=12<0D = 6(-1)\cdot2 - 0 = -12 < 0saddle point. Example 5: Saddle point
f(x,y)=x2y2f(x,y) = x^2 - y^2 at (0,0)(0,0).
fx=2x=0f_x = 2x = 0, fy=2y=0f_y = -2y = 0(0,0)(0,0) is critical. fxx=2f_{xx}=2, fyy=2f_{yy}=-2, fxy=0f_{xy}=0. D=2(2)0=4<0D = 2(-2) - 0 = -4 < 0saddle point.
Indeed: f(x,0)=x2f(x,0) = x^2 has min at x=0x=0; f(0,y)=y2f(0,y) = -y^2 has max at y=0y=0.

4. Classifying Critical Points in 3 Variables

For f(x,y,z)f(x,y,z) with f=0\nabla f = \mathbf{0}, compute the Hessian and check its eigenvalues:
  • All eigenvalues positive ⇒ local minimum
  • All eigenvalues negative ⇒ local maximum
  • Mixed signs ⇒ saddle point
  • Any zero eigenvalue ⇒ inconclusive

5. Global vs. Local Extrema

TypeDefinitionHow to Find
Local maxf(a)f(x)f(\mathbf{a}) \geq f(\mathbf{x}) near a\mathbf{a}Second derivative test
Local minf(a)f(x)f(\mathbf{a}) \leq f(\mathbf{x}) near a\mathbf{a}Second derivative test
SaddleNeither max nor minSecond derivative test
Global max/minLargest/smallest value over entire domainCheck critical points + boundary

6. Edge Cases & Gotchas

SituationWhat Happens
** D=0D = 0 **Test inconclusive — need higher-order methods
Boundary pointsMust check separately (extreme value theorem)
** f\nabla f undefined**Points where ff isn't differentiable are also critical
No critical pointsFunction is strictly monotonic (e.g., f(x,y)=x+yf(x,y)=x+y )

7. Common Pitfalls

❌ Pitfall 1: Forgetting to check fxxf_{xx} sign when D>0D > 0

D>0D > 0 alone doesn't tell you max vs. min. You need fxx>0f_{xx} > 0 (min) or fxx<0f_{xx} < 0 (max).

❌ Pitfall 2: Missing critical points where derivative doesn't exist

f(x,y)=x+yf(x,y) = |x| + |y| has a critical point at (0,0)(0,0) even though derivatives don't exist there.

❌ Pitfall 3: Assuming all critical points are extrema

Saddle points are critical points that are not extrema.

8. Formula Summary Table

ConceptFormula
Critical pointf=0\nabla f = \mathbf{0} or DNE
DiscriminantD=fxxfyy(fxy)2D = f_{xx}f_{yy} - (f_{xy})^2
Local minD>0D > 0 , fxx>0f_{xx} > 0
Local maxD>0D > 0 , fxx<0f_{xx} < 0
SaddleD<0D < 0
InconclusiveD=0D = 0

9. 📝 Practice Questions

Q1: Find critical point
f(x,y)=x2+3y22x+12y+10f(x,y) = x^2 + 3y^2 - 2x + 12y + 10.
Solution: fx=2x2=0x=1f_x = 2x - 2 = 0 \Rightarrow x = 1. fy=6y+12=0y=2f_y = 6y + 12 = 0 \Rightarrow y = -2. Critical point: (1,2)(1,-2). Q2: Classify critical point
Classify the critical point from Q1.
Solution: fxx=2f_{xx}=2, fyy=6f_{yy}=6, fxy=0f_{xy}=0. D=2(6)0=12>0D = 2(6) - 0 = 12 > 0, fxx=2>0f_{xx}=2 > 0local minimum. f(1,2)=1+12224+10=3f(1,-2) = 1 + 12 - 2 - 24 + 10 = -3. Q3: Saddle point
f(x,y)=xyf(x,y) = xy. Find and classify critical points.
Solution: fx=y=0f_x = y = 0, fy=x=0f_y = x = 0(0,0)(0,0). fxx=0f_{xx}=0, fyy=0f_{yy}=0, fxy=1f_{xy}=1. D=0012=1<0D = 0\cdot0 - 1^2 = -1 < 0saddle point. Indeed f(x,x)=x2f(x,x)=x^2 has min but f(x,x)=x2f(x,-x) = -x^2 has max at (0,0)(0,0). Q4: Multiple critical points
f(x,y)=x3+y33xyf(x,y) = x^3 + y^3 - 3xy. Find and classify all critical points.
Solution: fx=3x23y=0y=x2f_x = 3x^2 - 3y = 0 \Rightarrow y = x^2. fy=3y23x=0y2=xx4=xx(x31)=0f_y = 3y^2 - 3x = 0 \Rightarrow y^2 = x \Rightarrow x^4 = x \Rightarrow x(x^3-1)=0. x=0x=0y=0y=0. x=1x=1y=1y=1.
Critical points: (0,0)(0,0) and (1,1)(1,1).
fxx=6xf_{xx}=6x, fyy=6yf_{yy}=6y, fxy=3f_{xy}=-3.
At (0,0)(0,0): D=00(3)2=9<0D = 0\cdot0 - (-3)^2 = -9 < 0saddle. At (1,1)(1,1): D=66(3)2=369=27>0D = 6\cdot6 - (-3)^2 = 36-9=27>0, fxx=6>0f_{xx}=6>0local min. f(1,1)=1+13=1f(1,1)=1+1-3=-1. Q5: Global extremum
Find global minimum of f(x,y)=x2+y2f(x,y) = x^2 + y^2 on R2\mathbb{R}^2.
Solution: fx=2x=0f_x=2x=0, fy=2y=0f_y=2y=0(0,0)(0,0). D=220=4>0D=2\cdot2-0=4>0, fxx>0f_{xx}>0 ⇒ local min. Since f(x,y)0f(x,y)\geq 0 and f(0,0)=0f(0,0)=0, this is also the global minimum. No global maximum (unbounded above). Q6: Boundary check
Find max and min of f(x,y)=x+yf(x,y)=x+y on the unit disk x2+y21x^2+y^2\leq 1.
Solution: Interior: f=(1,1)(0,0)\nabla f=(1,1)\neq(0,0), so no interior critical points. Boundary x2+y2=1x^2+y^2=1: Use Lagrange multipliers or parameterise. f(x,y)=x+yf(x,y) = x+y on circle radius 1. Maximum of x+yx+y occurs when (x,y)=(1/2,1/2)(x,y)=(1/\sqrt{2}, 1/\sqrt{2}), value 2\sqrt{2}. Minimum at (1/2,1/2)(-1/\sqrt{2}, -1/\sqrt{2}), value 2-\sqrt{2}. Q7: D=0D=0 case
f(x,y)=x4+y4f(x,y) = x^4 + y^4. Find and classify (0,0)(0,0).
Solution: f=(4x3,4y3)=(0,0)\nabla f = (4x^3, 4y^3) = (0,0)(0,0)(0,0). fxx=12x2f_{xx}=12x^2, fyy=12y2f_{yy}=12y^2, fxy=0f_{xy}=0. At (0,0)(0,0): fxx=fyy=0f_{xx}=f_{yy}=0, D=0D=0inconclusive. By inspection: f(x,y)=x4+y40f(x,y) = x^4+y^4 \geq 0 and f(0,0)=0f(0,0)=0, so it's a local (and global) minimum. Q8: Steepest ascent
From (1,1)(1,1) on f(x,y)=x2+y2f(x,y)=x^2+y^2, in which direction does ff increase most rapidly?
Solution: f=(2x,2y)\nabla f = (2x,2y), f(1,1)=(2,2)\nabla f(1,1) = (2,2). Direction of steepest ascent: (2,2)8=(12,12)\frac{(2,2)}{\sqrt{8}} = \left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right). Q9: No critical points
Show f(x,y)=ex+yf(x,y)=e^{x+y} has no critical points.
Solution: f=(ex+y,ex+y)(0,0)\nabla f = (e^{x+y}, e^{x+y}) \neq (0,0) since ex+y>0e^{x+y} > 0 for all x,yx,y. Q10: Second derivative test in 3D
f(x,y,z)=x2+y2+z2f(x,y,z) = x^2 + y^2 + z^2. Find and classify critical points.
Solution: f=(2x,2y,2z)=(0,0,0)\nabla f = (2x,2y,2z) = (0,0,0)(0,0,0)(0,0,0). Hessian:
>H=[200020002]>> H = \begin{bmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{bmatrix} >
. Eigenvalues: 2,2,22,2,2 (all positive) ⇒ local minimum. f(0,0,0)=0f(0,0,0)=0 is global minimum.

🔗 Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.