Critical Points & Steepest Ascent/Descent
1434 words
7 min read
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) by solving ∇f=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 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) is where the tangent plane is horizontal (∇f=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
fx(x,y)=0,fy(x,y)=0Definition (Critical Point). A point a is a critical point of f if ∇f(a)=0 or ∇f does not exist. For f(x,y), solve:
Example 1: Finding critical pointsf(x,y)=x2+y2−4x+6y+13.fx=2x−4=0⇒x=2. fy=2y+6=0⇒y=−3.Critical point: (2,−3). f(2,−3)=4+9−8−18+13=0. Example 2: Multiple critical pointsf(x,y)=x3−3x+y2.fx=3x2−3=0⇒x=±1. fy=2y=0⇒y=0.Critical points: (1,0) and (−1,0).
3. Classification: Second Derivative Test
>D=fxxfyy−(fxy)2=det(H)>Theorem (Second Derivative Test for f(x,y)). Let (a,b) be a critical point of f. Define:
where H is the Hessian matrix.
- If D>0 and fxx>0: local minimum
- If D>0 and fxx<0: local maximum
- If D<0: saddle point
- If D=0: test is inconclusive Example 3: Classifying Example 1
f(x,y)=x2+y2−4x+6y+13, critical point (2,−3).fxx=2, fyy=2, fxy=0. D=2⋅2−02=4>0, fxx=2>0 ⇒ local minimum. Example 4: Classifying Example 2f(x,y)=x3−3x+y2.fxx=6x, fyy=2, fxy=0.At (1,0): D=6(1)⋅2−0=12>0, fxx=6>0 ⇒ local min. At (−1,0): D=6(−1)⋅2−0=−12<0 ⇒ saddle point. Example 5: Saddle pointf(x,y)=x2−y2 at (0,0).fx=2x=0, fy=−2y=0 ⇒ (0,0) is critical. fxx=2, fyy=−2, fxy=0. D=2(−2)−0=−4<0 ⇒ saddle point.Indeed: f(x,0)=x2 has min at x=0; f(0,y)=−y2 has max at y=0.
4. Classifying Critical Points in 3 Variables
For f(x,y,z) with ∇f=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
| Type | Definition | How to Find |
|---|---|---|
| Local max | f(a)≥f(x) near a | Second derivative test |
| Local min | f(a)≤f(x) near a | Second derivative test |
| Saddle | Neither max nor min | Second derivative test |
| Global max/min | Largest/smallest value over entire domain | Check critical points + boundary |
6. Edge Cases & Gotchas
| Situation | What Happens |
|---|---|
| ** D=0 ** | Test inconclusive — need higher-order methods |
| Boundary points | Must check separately (extreme value theorem) |
| ** ∇f undefined** | Points where f isn't differentiable are also critical |
| No critical points | Function is strictly monotonic (e.g., f(x,y)=x+y ) |
7. Common Pitfalls
❌ Pitfall 1: Forgetting to check fxx sign when D>0
D>0 alone doesn't tell you max vs. min. You need fxx>0 (min) or fxx<0 (max).
❌ Pitfall 2: Missing critical points where derivative doesn't exist
f(x,y)=∣x∣+∣y∣ has a critical point at (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
| Concept | Formula |
|---|---|
| Critical point | ∇f=0 or DNE |
| Discriminant | D=fxxfyy−(fxy)2 |
| Local min | D>0 , fxx>0 |
| Local max | D>0 , fxx<0 |
| Saddle | D<0 |
| Inconclusive | D=0 |
9. 📝 Practice Questions
>H=200020002>Q1: Find critical pointf(x,y)=x2+3y2−2x+12y+10.Solution: fx=2x−2=0⇒x=1. fy=6y+12=0⇒y=−2. Critical point: (1,−2). Q2: Classify critical pointClassify the critical point from Q1.Solution: fxx=2, fyy=6, fxy=0. D=2(6)−0=12>0, fxx=2>0 ⇒ local minimum. f(1,−2)=1+12−2−24+10=−3. Q3: Saddle pointf(x,y)=xy. Find and classify critical points.Solution: fx=y=0, fy=x=0 ⇒ (0,0). fxx=0, fyy=0, fxy=1. D=0⋅0−12=−1<0 ⇒ saddle point. Indeed f(x,x)=x2 has min but f(x,−x)=−x2 has max at (0,0). Q4: Multiple critical pointsf(x,y)=x3+y3−3xy. Find and classify all critical points.Solution: fx=3x2−3y=0⇒y=x2. fy=3y2−3x=0⇒y2=x⇒x4=x⇒x(x3−1)=0. x=0 ⇒ y=0. x=1 ⇒ y=1.Critical points: (0,0) and (1,1).fxx=6x, fyy=6y, fxy=−3.At (0,0): D=0⋅0−(−3)2=−9<0 ⇒ saddle. At (1,1): D=6⋅6−(−3)2=36−9=27>0, fxx=6>0 ⇒ local min. f(1,1)=1+1−3=−1. Q5: Global extremumFind global minimum of f(x,y)=x2+y2 on R2.Solution: fx=2x=0, fy=2y=0 ⇒ (0,0). D=2⋅2−0=4>0, fxx>0 ⇒ local min. Since f(x,y)≥0 and f(0,0)=0, this is also the global minimum. No global maximum (unbounded above). Q6: Boundary checkFind max and min of f(x,y)=x+y on the unit disk x2+y2≤1.Solution: Interior: ∇f=(1,1)=(0,0), so no interior critical points. Boundary x2+y2=1: Use Lagrange multipliers or parameterise. f(x,y)=x+y on circle radius 1. Maximum of x+y occurs when (x,y)=(1/2,1/2), value 2. Minimum at (−1/2,−1/2), value −2. Q7: D=0 casef(x,y)=x4+y4. Find and classify (0,0).Solution: ∇f=(4x3,4y3)=(0,0) ⇒ (0,0). fxx=12x2, fyy=12y2, fxy=0. At (0,0): fxx=fyy=0, D=0 ⇒ inconclusive. By inspection: f(x,y)=x4+y4≥0 and f(0,0)=0, so it's a local (and global) minimum. Q8: Steepest ascentFrom (1,1) on f(x,y)=x2+y2, in which direction does f increase most rapidly?Solution: ∇f=(2x,2y), ∇f(1,1)=(2,2). Direction of steepest ascent: 8(2,2)=(21,21). Q9: No critical pointsShow f(x,y)=ex+y has no critical points.Solution: ∇f=(ex+y,ex+y)=(0,0) since ex+y>0 for all x,y. Q10: Second derivative test in 3Df(x,y,z)=x2+y2+z2. Find and classify critical points.Solution: ∇f=(2x,2y,2z)=(0,0,0) ⇒ (0,0,0). Hessian:
. Eigenvalues: 2,2,2 (all positive) ⇒ local minimum. f(0,0,0)=0 is global minimum.
🔗 Cross-References
- Next topic: Hessian Matrix & Local Extrema
- Week 11 (Hessian): Detailed classification using eigenvalues
- BSMA1001 (Maths 1): Single-variable critical points
- BSCS3004 (Deep Learning): Gradient descent optimisation, saddle points in high dimensions Join Discord Previous10.1 Tangent PlanesNext11.1 Hessian Matrix