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=fxxโfyyโโ(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=fxxโfyyโโ(fxyโ)2 |
| Local min | D>0 , fxxโ>0 |
| Local max | D>0 , fxxโ<0 |
| Saddle | D<0 |
| Inconclusive | D=0 |
9. ๐ Practice Questions
>H=โ200โ020โ002โโ>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)โ=(2โ1โ,2โ1โ). 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