Math Bytes · Multivariable calculus · Episode 5 · Applications of multivariable derivatives
Finding peaks and valleys in 3D
At a peak or a valley of a surface z = f(x, y), the slope is zero in both the x and y directions, so both partial derivatives are zero; that spot is a critical point. For f = x² + y² − 4x − 2y the critical point is (2, 1), the bottom of a bowl, while x² − y² is flat at (0, 0) and is a saddle point.
Flat both ways
Picture the graph z = f(x, y) as a landscape. At the very top of a hill, or the very bottom of a valley, the ground is level: walk a tiny step in the x direction or in the y direction, and you neither climb nor drop at first.
The slopes in those two directions are the partial derivatives from lesson 3. So at a peak or a valley (of a smooth surface):
∂f/∂x = 0(flat in the x direction)∂f/∂y = 0(flat in the y direction)
A point where both are zero is a critical point. (Points where a partial doesn't exist count as critical points too, but this lesson sticks to smooth surfaces.)
Worked example: x² + y² − 4x − 2y
Take f(x, y) = x² + y² − 4x − 2y.
- Partial with respect to x: hold
ystill, soy²and−2yare constants (their derivative is 0). The power rule onx²gives2x, and−4xgives−4:∂f/∂x = 2x − 4. - Partial with respect to y: hold
xstill:∂f/∂y = 2y − 2. - Set both to zero:
2x − 4 = 0gives2x = 4, sox = 2.2y − 2 = 0gives2y = 2, soy = 1.
The critical point is (2, 1).
Is it a peak or a valley? This surface is a bowl: completing the square, f = (x − 2)² + (y − 1)² − 5, so it can never go below −5, and it reaches −5 exactly at (2, 1). That's the bottom of the bowl, a minimum (a valley). Check: f(2, 1) = 4 + 1 − 8 − 2 = −5.
Careful: saddle points
Flat doesn't always mean a peak or a valley. Take g(x, y) = x² − y²:
∂g/∂x = 2xand∂g/∂y = −2y, which are both zero only at(0, 0).- Along the x-axis the surface is
x², curving up. Along the y-axis it is−y², curving down.
So (0, 0) is a critical point that is neither a max nor a min: it's a saddle point, up one way and down the other, like the middle of a horse saddle or a mountain pass.
Try it yourself
- Find the critical point of
h(x, y) = x² + y² − 8x − 4y. - Find the critical point of
k(x, y) = x² + y² + 2x.
(Answers: 1. 2x − 8 = 0 and 2y − 4 = 0 give (4, 2), the bottom of a bowl. 2. 2x + 2 = 0 and 2y = 0 give (−1, 0), also a minimum.)
Good to know
- A critical point is a candidate: it can be a local max, a local min, or a saddle point.
- The second derivative test sorts them using
D = f_xx · f_yy − (f_xy)²; the video leaves it out and uses "this is a bowl" instead. - "Peaks and valleys in 3D" means on the graph surface of a function of two variables,
z = f(x, y). - The 3D pictures in the video are flat sketches with simple perspective, and the level bubble is just a memory aid for "flat".
Answer to the comment question
f(x, y) = x² + y² − 6x + 2y. Where's the critical point? (3, −1). The partials are ∂f/∂x = 2x − 6 and ∂f/∂y = 2y + 2. Setting 2x − 6 = 0 gives x = 3, and 2y + 2 = 0 gives y = −1. Like the example, the surface is a bowl, f = (x − 3)² + (y + 1)² − 10, so (3, −1) is its lowest point, a minimum.
Test your knowledge
Quick quiz: Finding peaks and valleys in 3D
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- OpenStax, "Calculus Volume 3, 4.7 Maxima/Minima Problems": critical points where both partials are zero; second derivative test; saddle points
- Wolfram MathWorld, "Saddle Point": a critical point that is neither a max nor a min, e.g. x² − y²
- MIT OpenCourseWare, "18.02 Multivariable Calculus (Fall 2007)": lecture notes
Video transcript
Where is the ground flat in every direction?
At a hilltop or a valley floor, the slope is zero in both the x and y directions. So set both partials to zero. That spot is a critical point.
Take f equals x squared plus y squared, minus four x, minus two y. The partials are two x minus four, and two y minus two.
Both are zero at two, one. This is a bowl, so that's its lowest spot: a valley.
But careful: x squared minus y squared is flat at zero, zero, and it's a saddle, up one way and down the other.
Your turn. f equals x squared plus y squared, minus six x, plus two y. Where's the critical point? Comment your answer below!
That's your byte.
More from Multivariable calculus
- Multivariable calculus EP2Contour maps
- Multivariable calculus EP3Partial derivatives
- Multivariable calculus EP7Double integrals
- Multivariable calculus EP8The big three theorems