Stationary Points of a Surface

Flat only when both partials vanish.

Level in both directions

At the top of a hill the ground is level: whichever way you step, it neither rises nor falls at first. On a surface z = f(x, y) that needs the slope in the x direction and the slope in the y direction to be 0 at the same point. One is not enough. For f = x² + y, ∂f/∂x = 2x is 0 all along the y-axis, but ∂f/∂y = 1 everywhere, so the surface keeps climbing in y and is level nowhere.

A stationary point of f is a point where ∂f/∂x = 0 and ∂f/∂y = 0 together, so that ∇f = (0, 0). Then the slope ∇f · u is 0 in every direction u, and the tangent plane there is horizontal.

The dome z = 16(1 − x² − y²). At its top, above the origin, ∂f/∂x = −32x and ∂f/∂y = −32y are both 0, and the gold patch of tangent plane there is horizontal, at height 16.

Solve both equations together

To find the stationary points, set both partial derivatives to 0 and solve the two equations as a pair. For f = x² + 2y² − 4x + 4y, ∂f/∂x = 2x − 4 and ∂f/∂y = 4y + 4. The first is 0 only when x = 2 and the second only when y = −1, so the one stationary point is (2, −1), where f = 4 + 2 − 8 − 4 = −6.

For f = x² + y² − 2x − 4y, 2x − 2 = 0 and 2y − 4 = 0 give the point (1, 2), not (2, 4): differentiating halves each coefficient. And x comes from the x equation, so the point is not (2, 1) either.

Bowl, dome, or neither

A stationary point can be the bottom of a bowl, a local minimum, where the surface rises in every direction. It can be the top of a dome, a local maximum, where it falls in every direction.

Or it can be neither. The saddle z = x² − y² has ∂f/∂x = 2x and ∂f/∂y = −2y, both 0 at the origin, so the origin is stationary. Along the x-axis the surface is z = x², rising on both sides; along the y-axis it is z = −y², falling on both sides. A stationary point that is a minimum along one line and a maximum along another is a saddle point.

The saddle z = x² − y² over the square with |x| ≤ 2 and |y| ≤ 2. Its tangent plane at the origin, the gold patch, is horizontal, at height 0, yet the surface rises above it along x and falls below it along y.

The second-derivative test

The test in two variables uses all three second partial derivatives at the stationary point. Work out D = (∂²f/∂x²)(∂²f/∂y²) − (∂²f/∂x∂y)². If D > 0 and ∂²f/∂x² > 0, the point is a local minimum. If D > 0 and ∂²f/∂x² < 0, it is a local maximum. If D < 0, it is a saddle point. If D = 0, the test gives no conclusion.

For x² + 2y² − 4x + 4y at (2, −1): ∂²f/∂x² = 2, ∂²f/∂y² = 4 and ∂²f/∂x∂y = 0, so D = 2 × 4 − 0² = 8. D is positive and ∂²f/∂x² is positive, so (2, −1) is a minimum. Completing the square agrees: f = (x − 2)² + 2(y + 1)² − 6, which is never below −6.

For the saddle x² − y² at the origin: D = 2 × (−2) − 0² = −4, negative, so the origin is a saddle point.

Why the mixed derivative counts

Take f = x² + 3xy + y². Its partial derivatives 2x + 3y and 3x + 2y are both 0 only at the origin. There ∂²f/∂x² = 2 and ∂²f/∂y² = 2, both positive, so the surface curves upward along the x-axis and along the y-axis. But ∂²f/∂x∂y = 3, and D = 2 × 2 − 3² = −5. The origin is a saddle point.

The slices show it. Along the line y = x, f = x² + 3x² + x² = 5x², rising. Along the line y = −x, f = x² − 3x² + x² = −x², falling. A test that looked only at the two pure second derivatives would have called this a minimum.

xz

Three slices of z = x² + 3xy + y² through the origin, each plotted against x. Along the x-axis it is z = x²; along y = x it is the gold curve z = 5x²; along y = −x it is z = −x², which falls on both sides. One slice falling is enough to rule out a minimum.

Two stationary points

For f = 3x − x³ − y², ∂f/∂x = 3 − 3x² and ∂f/∂y = −2y. The first is 0 at x = 1 and x = −1, and the second at y = 0, so there are two stationary points, (1, 0) and (−1, 0). The second derivatives are ∂²f/∂x² = −6x, ∂²f/∂y² = −2 and ∂²f/∂x∂y = 0.

At (1, 0): D = (−6)(−2) − 0² = 12, positive, with ∂²f/∂x² = −6 negative, so it is a local maximum, with f = 3 − 1 = 2. At (−1, 0): D = (6)(−2) − 0² = −12, negative, so it is a saddle point, with f = −3 + 1 = −2. Each stationary point is classified on its own.

When D = 0

At the origin, f = x⁴ + y⁴ has every second derivative 0, so D = 0, and the origin is a minimum. f = −x⁴ − y⁴ also has D = 0, and the origin is a maximum. f = x³ + y² has ∂²f/∂x² = 6x = 0 there, so D = 0 again, and the origin is neither: along the x-axis f = x³ is negative on one side and positive on the other.

So D = 0 decides nothing. The point must be examined another way, by completing the square or by looking at slices.

xyρzθ = 30°

the slice at 30° is z = (cos 2θ) ρ² = 0.5 ρ²: a bowl while cos 2θ > 0, a dome while cos 2θ < 0, and the change of sign happens at 45°

Turn the cut until the slice is flat

The contours of z = x² − y² and a vertical cut through the origin at θ = 30°. The slice is z = (cos 60°)ρ² = 0.5ρ², an upward parabola. Turn the cut to 45° and the slice is flat; past 45° it opens downward, to z = −ρ² at 90°. The origin is the bottom of some slices and the top of others: a saddle, with D = −4.

The usual mistakes

Setting only one partial derivative to 0. The point must make both 0 at once.

Reading the point off the coefficients. For x² + y² − 6x − 8y the stationary point is (3, 4), from 2x − 6 = 0 and 2y − 8 = 0, not (6, 8).

Classifying from ∂²f/∂x² and ∂²f/∂y² alone. x² + 3xy + y² has both positive and is still a saddle, because D = −5.

Reading D = 0 as a saddle. The test is silent at D = 0: x⁴ + y⁴ has a minimum there.

A coffee roaster

In the application below, a roaster’s weekly profit depends on the prices of two blends, because customers switch between them. Setting both partial derivatives of the profit to 0 gives two linear equations for the two prices, and D, with the sign of the second derivative, shows that the point is a maximum.

Worked example: A Coffee Roaster Pricing Two Blends That Customers Switch Between: the Stationary Point of the Profit, and What Kind of Point It Is

Question A coffee roaster sells two blends, House at p dollars a bag and Dark at q dollars a bag. Because some customers switch between them, each week it sells 120 − 20p + 10q bags of House and 240 + 10p − 20q bags of Dark, for prices near the present ones. A bag of House costs $4 to produce and a bag of Dark costs $6. (a) Write the weekly profit P(p, q) in dollars and find the prices at which both of its partial derivatives are zero. (b) Use the second-derivative test to classify that stationary point. Find the weekly profit there, and compare it with the profit at the present prices, $8 for House and $11 for Dark.

  1. 1.(a) Each blend earns its price minus its cost on every bag sold, so P(p, q) = (p − 4)(120 − 20p + 10q) + (q − 6)(240 + 10p − 20q) dollars a week.

    11131581012House price p, dollarsDark price q, dollarsnow(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)
    11131581012House price p, dollarsDark price q, dollarsnow(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)
    (a) The curves join prices that give the same weekly profit; the present prices, $8 and $11, lie on one of them.
  2. 2.Differentiate with respect to p, holding q constant, by the product rule: ∂ P∂ p = (120 − 20p + 10q) − 20(p − 4) + 10(q − 6) = 140 − 40p + 20q. In the same way, ∂ P∂ q = 10(p − 4) + (240 + 10p − 20q) − 20(q − 6) = 320 + 20p − 40q.

    11131581012House price p, dollarsDark price q, dollarsnow(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40q
    11131581012House price p, dollarsDark price q, dollarsnow(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40q
    Each line is where one partial derivative is zero: 140 − 40p + 20q = 0 is the steeper line and 320 + 20p − 40q = 0 the other.
  3. 3.Setting both to zero and dividing by 20 gives 2p − q = 7 and −p + 2q = 16. Substituting q = 2p − 7 into the second gives −p + 4p − 14 = 16, so 3p = 30, p = 10 and q = 13: House at $10 and Dark at $13.

    11131581012House price p, dollarsDark price q, dollars(10, 13)now(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40qboth zero: p = 10, q = 13
    11131581012House price p, dollarsDark price q, dollars(10, 13)now(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40qboth zero: p = 10, q = 13
    The lines cross at the stationary point, House at $10 and Dark at $13.
  4. 4.(b) The second partial derivatives are ∂2 P∂ p2 = −40, ∂2 P∂ q2 = −40 and ∂2 P∂ p   ∂ q = 20, so D = (−40)(−40) − 202 = 1600 − 400 = 1200. Since D > 0 and ∂2 P∂ p2 < 0, the stationary point is a local maximum; P is quadratic and these values hold everywhere, so it is the greatest profit.

    11131581012House price p, dollarsDark price q, dollars(10, 13)now(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40qboth zero: p = 10, q = 13(b) D = 1600 − 400 = 1200 > 0, and −40 < 0
    11131581012House price p, dollarsDark price q, dollars(10, 13)now(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40qboth zero: p = 10, q = 13(b) D = 1600 − 400 = 1200 > 0, and −40 < 0
    (b) D = 1200 > 0 and ∂2 P∂ p2 = −40 < 0, so the stationary point is a maximum: the curves of equal profit close in around it.
  5. 5.At (10, 13) the roaster sells 120 − 200 + 130 = 50 bags of House and 240 + 100 − 260 = 80 bags of Dark, for a profit of 6 × 50 + 7 × 80 = 300 + 560 = $860 a week. At the present prices it sells 120 − 160 + 110 = 70 and 240 + 80 − 220 = 100 bags, for 4 × 70 + 5 × 100 = $780, so the new prices add $80 a week.

    11131581012House price p, dollarsDark price q, dollars(10, 13)860now: 780(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40qboth zero: p = 10, q = 13(b) D = 1600 − 400 = 1200 > 0, and −40 < 0860 dollars a week, against 780 now
    11131581012House price p, dollarsDark price q, dollars(10, 13)860now: 780(a) P = (p − 4)(120 − 20p + 10q)+ (q − 6)(240 + 10p − 20q)rate in p: 140 − 40p + 20qrate in q: 320 + 20p − 40qboth zero: p = 10, q = 13(b) D = 1600 − 400 = 1200 > 0, and −40 < 0860 dollars a week, against 780 now
    The greatest profit is $860 a week, $80 more than at the present prices.

Answer: (a) P = (p − 4)(120 − 20p + 10q) + (q − 6)(240 + 10p − 20q), stationary at p = 10, q = 13; (b) D = 1200 > 0 with ∂2 P∂ p2 = −40 < 0, so it is a maximum: $860 a week, $80 more than the $780 at the present prices

Common mistakes

  • Setting the price of House as if it sold alone, from House's own profit only. A higher price for House sends customers to Dark, which adds 10(q − 6) to ∂ P∂ p; leaving it out gives the wrong prices.
  • Classifying the point from ∂2 P∂ p2 < 0 and ∂2 P∂ q2 < 0 alone. A saddle point can have both negative when the mixed derivative is large, so the test needs D > 0 as well.

More partial derivatives problems, worked step by step →

Practice Stationary Points of a Surface in the app