Intuition Why this page exists
The parent note gave you the rule and three clean examples. But real problems are messier: what if f xx = 0 ? What if D = 0 ? What if there are four critical points scattered across all quadrants? What if the "surface" is actually the cost of running a factory? This page marches through every kind of situation the second derivative test can hand you, so you never meet a case you haven't already rehearsed.
We build on the parent test : at a critical point ( a , b ) where f x = f y = 0 , we compute
D = f xx f y y − ( f x y ) 2
and read off min / max / saddle / inconclusive.
Definition The shift variables
u and v (recall from the parent)
Throughout, when we talk about "completing the square" we mean the parent derivation's move: measure position relative to the critical point ( a , b ) by setting
u = x − a , v = y − b .
So u is "how far right of the critical point" and v is "how far above it". The Taylor expansion then reads
f ( a + u , b + v ) ≈ f ( a , b ) + 2 1 ( f xx u 2 + 2 f x y uv + f y y v 2 ) ,
and completing the square in u (treating v as fixed) needs f xx = 0 to divide by. When f xx = 0 we instead complete the square in v , needing f y y = 0 . Keep this picture handy for Example 5.
Before any example, let's lay out the full space of things that can happen . Every worked example below is tagged with the cell it covers.
Cell
Situation
What makes it tricky
Example
A
D > 0 , f xx > 0
clean minimum
Ex 1
B
D > 0 , f xx < 0
clean maximum
Ex 2
C
D < 0
clean saddle
Ex 3
D
Several critical points in different quadrants
must classify each separately
Ex 4
E
f xx = 0 at the point
can't complete the square in u — pivot to f y y
Ex 5
F
D = 0 (degenerate)
test fails — investigate by hand
Ex 6
G
D = 0 but it's actually a saddle
shows D = 0 ≠ "flat valley"
Ex 7
H
Real-world word problem (optimisation)
translate words → f , mind units
Ex 8
I
Exam twist: parameter that flips the classification
classify as a function of a constant
Ex 9
Intuition What "cover every cell" means
Cells A–C are the three standard verdicts. D forces you to handle all four quadrants of the plane at once. E covers the degenerate pivot (f xx = 0 , the assumption the derivation quietly made). F and G expose the two faces of D = 0 . H grounds it, I stress-tests it. Together they are the whole zoo.
f ( x , y ) = x 2 + x y + y 2 + 3 x
Forecast first: the x 2 and y 2 terms both curve up , so guess a minimum . Where, though? The + 3 x tilts things — the low point won't be at the origin.
Step 1 — Find critical points. Set both first partials to zero.
f x = 2 x + y + 3 = 0 , f y = x + 2 y = 0
Why this step? Every extremum or saddle lives where the gradient vanishes ; the tilt term 3 x moves the solution off-origin.
From f y = 0 : x = − 2 y . Sub into f x = 0 : 2 ( − 2 y ) + y + 3 = 0 ⇒ − 3 y + 3 = 0 ⇒ y = 1 , then x = − 2 .
Critical point: ( − 2 , 1 ) .
Step 2 — Second partials.
f xx = 2 , f y y = 2 , f x y = 1
Why this step? These are the coefficients of the quadratic form that decides the shape.
Step 3 — Discriminant.
D = ( 2 ) ( 2 ) − ( 1 ) 2 = 3 > 0
Why this step? D > 0 says "extremum, not saddle"; its sign is the first gate.
Step 4 — Pick min vs max. f xx = 2 > 0 , so local minimum at ( − 2 , 1 ) .
Why this step? D > 0 forces f xx and f y y to share a sign; positive means the bowl opens upward.
Verify: value there is f ( − 2 , 1 ) = 4 − 2 + 1 − 6 = − 3 . Nudge: f ( − 2 , 1.1 ) ≈ 4 − 2.2 + 1.21 − 6 = − 2.99 > − 3 . Higher on all sides ✓. Consistent with a minimum.
f ( x , y ) = − x 2 − y 2 + 4 x + 6 y
Forecast: both squares are negative (open downward) — this is a dome , expect a maximum .
Step 1 — Critical point.
f x = − 2 x + 4 = 0 ⇒ x = 2 , f y = − 2 y + 6 = 0 ⇒ y = 3
Critical point ( 2 , 3 ) . Why this step? The gradient is where the tangent plane goes flat — the only place a max/min/saddle can live.
Step 2 — Second partials. f xx = − 2 , f y y = − 2 , f x y = 0 .
Why this step? These three numbers are the entire input the test needs; they measure the curvature in each direction and the tilt between them.
Step 3 — Discriminant. D = ( − 2 ) ( − 2 ) − 0 = 4 > 0 . Why this step? D > 0 rules out a saddle, leaving only min or max.
Step 4 — Verdict. f xx = − 2 < 0 → local maximum .
Why f xx ? Same-sign forced by D > 0 ; negative means frowning (dome).
Verify: f ( 2 , 3 ) = − 4 − 9 + 8 + 18 = 13 . Nudge f ( 2.1 , 3 ) = − 4.41 − 9 + 8.4 + 18 = 12.99 < 13 ✓. Peak.
f ( x , y ) = x y
Forecast: along the line y = x we get x 2 (up), along y = − x we get − x 2 (down). Up one way, down another → saddle .
Step 1 — Critical point. f x = y = 0 , f y = x = 0 ⇒ ( 0 , 0 ) .
Why this step? Only there does the surface flatten — the prerequisite for the test.
Step 2 — Second partials. f xx = 0 , f y y = 0 , f x y = 1 .
Why this step? We need the curvature data; strikingly, both pure curvatures are zero here, so all the shape information sits in the cross-term f x y .
Step 3 — Discriminant. D = ( 0 ) ( 0 ) − ( 1 ) 2 = − 1 < 0 . Why stop here? D < 0 alone declares a saddle — no need to check f xx .
Step 4 — Verdict. Saddle point at ( 0 , 0 ) .
Why this step? It states the conclusion the sign of D forces, closing the classification.
The figure below shows this saddle as a contour map : the blue curves are places where f = x y is positive (rising away from the point), the pink curves where it is negative (falling), and the yellow dashed axes are the f = 0 lines. Look how both signs surround the single white critical point — that co-existence of "up" and "down" directions is the visual fingerprint of D < 0 .
Verify: f ( 0.1 , 0.1 ) = 0.01 > 0 but f ( 0.1 , − 0.1 ) = − 0.01 < 0 — both signs near the point ✓. That two-sign behaviour is exactly what D < 0 predicts.
Intuition Note the surprise in Example 3
Here f xx = 0 and f y y = 0 , yet the test still works because D < 0 never needs f xx . The pure cross-term f x y carries all the curvature — it is the tilt of the Pringle.
f ( x , y ) = x 3 − 12 x + y 3 − 3 y
Forecast: cubics give two turning points each in x and y , so expect four critical points spread over the quadrants — a mix of verdicts.
Step 1 — Critical points. The variables separate:
f x = 3 x 2 − 12 = 0 ⇒ x = ± 2 , f y = 3 y 2 − 3 = 0 ⇒ y = ± 1
Why this step? Because f splits into an x -part and a y -part, the gradient conditions decouple; every combination of x = ± 2 with y = ± 1 is a critical point.
Four points: ( 2 , 1 ) , ( 2 , − 1 ) , ( − 2 , 1 ) , ( − 2 , − 1 ) — one in each quadrant .
Step 2 — Second partials. f xx = 6 x , f y y = 6 y , f x y = 0 , so D = 36 x y .
Why this step? With f x y = 0 , the discriminant is just the product of the two diagonal curvatures — sign of x y decides everything.
Step 3 — Classify each. (Recall D = 36 x y , and if D > 0 read f xx = 6 x .)
Point
D = 36 x y
f xx = 6 x
Verdict
( 2 , 1 )
+ 72
+ 12
min
( 2 , − 1 )
− 72
—
saddle
( − 2 , 1 )
− 72
—
saddle
( − 2 , − 1 )
+ 72
− 12
max
Why this table? Every quadrant produces a different verdict — this is the case class where you must not classify once and reuse.
Verify: at ( 2 , 1 ) , f = 8 − 24 + 1 − 3 = − 18 ; at ( − 2 , − 1 ) , f = − 8 + 24 − 1 + 3 = 18 . The min value < the max value, and the two saddles at ( 2 , − 1 ) , ( − 2 , 1 ) give f = 8 − 24 − 1 + 3 = − 14 and − 8 + 24 + 1 − 3 = 14 , sitting between — geometrically sensible ✓.
f ( x , y ) = y 2 + 4 x y (careful — the derivation assumed f xx = 0 )
Forecast: there's no x 2 term, so f xx = 0 . Recall from the definition box that the parent derivation set u = x − a , v = y − b and completed the square in u , a move that quietly divided by f xx . Does the test still deliver a verdict when f xx = 0 ?
Step 1 — Critical point.
f x = 4 y = 0 ⇒ y = 0 , f y = 2 y + 4 x = 0 ⇒ x = 0
Critical point ( 0 , 0 ) .
Why this step? The test only applies where the gradient vanishes; we must locate that point before touching second derivatives. (Here ( a , b ) = ( 0 , 0 ) , so the shift variables are simply u = x , v = y .)
Step 2 — Second partials. f xx = 0 , f y y = 2 , f x y = 4 .
Why this step? These curvatures feed the discriminant; note the flagged feature — f xx = 0 — which is exactly the degeneracy this example is built to test.
Step 3 — Discriminant. D = ( 0 ) ( 2 ) − ( 4 ) 2 = − 16 < 0 .
Why this rescues us: D < 0 gives saddle directly and never uses f xx . The "complete the square in u " worry only mattered for the D > 0 min/max split, where dividing by f xx was needed. When f xx = 0 but D < 0 , we simply complete the square in v instead (dividing by f y y = 2 = 0 ) — the geometry, two opposite-sign curvatures, is unchanged.
Step 4 — Verdict. Saddle at ( 0 , 0 ) .
Why this step? It records the conclusion D < 0 dictates, showing the degenerate pivot never blocked the answer.
Verify: along y = 0 : f = 0 flat; along x = − y : f = y 2 − 4 y 2 = − 3 y 2 < 0 ; along x = y : f = y 2 + 4 y 2 = 5 y 2 > 0 . Both signs appear ✓ — saddle confirmed.
f xx = 0 means the test breaks"
Why it feels right: the derivation divided by f xx . Fix: f xx = 0 is a problem only if you also need to distinguish min from max — i.e. only in the D > 0 branch. If D > 0 and f xx = 0 , then D = f xx f y y − f x y 2 = − f x y 2 ≤ 0 , a contradiction — so D > 0 forces f xx = 0 automatically. The pivot worry can never actually bite you in the extremum case.
f ( x , y ) = x 4 + y 4
Forecast: fourth powers are flatter than quadratics near 0 . The test may go blind (D = 0 ), even though intuitively this is a minimum .
Step 1 — Critical point. f x = 4 x 3 = 0 , f y = 4 y 3 = 0 ⇒ ( 0 , 0 ) .
Why this step? We must confirm the gradient is zero here before the second derivative test is even allowed to speak.
Step 2 — Second partials. f xx = 12 x 2 , f y y = 12 y 2 , f x y = 0 . At ( 0 , 0 ) all are 0 .
Why this step? We evaluate curvature at the critical point ; discovering every entry is zero is the warning sign that the quadratic approximation is flat.
Step 3 — Discriminant. D = ( 0 ) ( 0 ) − 0 = 0 → inconclusive .
Why the test fails: the second-order Taylor information is entirely flat; the true shape lives in the fourth-order terms the Hessian cannot see.
Step 4 — Investigate by hand. For any ( x , y ) = ( 0 , 0 ) , f = x 4 + y 4 > 0 = f ( 0 , 0 ) . So it's a strict local (and global) minimum .
Why this step: with the test silent, we bypass the quadratic form and inspect the sign of f − f ( 0 , 0 ) directly — the definition of a minimum.
Verify: f ( 0.1 , 0 ) = 0.0001 > 0 and f ( 0 , 0.1 ) = 0.0001 > 0 ; nowhere near the origin is f negative ✓. Minimum, despite D = 0 .
f ( x , y ) = x 4 − y 4
Forecast: looks like Example 6 but with a sign flip. That flip should turn "min" into "saddle" — proving D = 0 carries no guaranteed verdict.
Step 1 — Critical point. f x = 4 x 3 , f y = − 4 y 3 ⇒ ( 0 , 0 ) .
Why this step? Same rule as always — locate where the gradient vanishes before classifying.
Step 2 — Second partials at ( 0 , 0 ) . f xx = 12 x 2 = 0 , f y y = − 12 y 2 = 0 , f x y = 0 .
Why this step? We read the curvature at the point; all zero again means the Hessian sees a flat quadratic and will be uninformative.
Step 3 — Discriminant. D = 0 → inconclusive again.
Why this step? Computing D is still the first move; here it merely confirms the test cannot decide, forcing a by-hand look.
Step 4 — By hand. Along the x -axis (y = 0 ): f = x 4 > 0 (curves up). Along the y -axis (x = 0 ): f = − y 4 < 0 (curves down). Two signs → saddle .
Why this matters: Examples 6 and 7 have the same D = 0 yet opposite geometry — hard proof that D = 0 demands hands-on investigation, never a lazy default.
Verify: f ( 0.1 , 0 ) = 0.0001 > 0 but f ( 0 , 0.1 ) = − 0.0001 < 0 ✓ — genuine saddle.
D = 0 as a fixed answer
D = 0 is a question , not an answer. Example 6 ⇒ min, Example 7 ⇒ saddle, and f = x 3 -type surfaces can even give a monkey saddle — all with D = 0 .
Worked example A box factory
An open-top rectangular box must hold V = 32 m 3 . With base x × y (metres) and height h , we have h = 32/ ( x y ) . Material used (in m 2 ) is the base plus four walls:
S ( x , y ) = x y + 2 x h + 2 y h = x y + y 64 + x 64
Forecast: minimising surface should give a nearly square base — expect x = y .
Step 1 — Critical point.
S x = y − x 2 64 = 0 , S y = x − y 2 64 = 0
Why this step? Least material sits at a constrained extremum, here turned into an unconstrained one by substituting h .
From the first: y = 64/ x 2 . Sub into second: x = 64/ y 2 = 64 x 4 /6 4 2 = x 4 /64 ⇒ x 3 = 64 ⇒ x = 4 . Then y = 64/16 = 4 .
Critical point ( 4 , 4 ) , height h = 32/16 = 2 m .
Step 2 — Second partials.
S xx = x 3 128 , S y y = y 3 128 , S x y = 1
At ( 4 , 4 ) : S xx = 128/64 = 2 , S y y = 2 , S x y = 1 .
Why this step? These curvatures tell us whether the critical point is truly the cheapest design or a saddle in disguise — a genuine risk with rational functions like 64/ x .
Step 3 — Discriminant. D = ( 2 ) ( 2 ) − 1 2 = 3 > 0 , S xx = 2 > 0 → local minimum ✓ (least material).
Why f xx > 0 matters: confirms we found the cheapest box, not a costly saddle.
Verify (units + numbers): dimensions 4 × 4 × 2 m , volume = 4 ⋅ 4 ⋅ 2 = 32 m 3 ✓ (constraint met). Surface S = 16 + 64/4 + 64/4 = 16 + 16 + 16 = 48 m 2 . All terms are areas (m 2 ) ✓ — dimensionally consistent.
( 0 , 0 ) for f ( x , y ) = x 2 + k x y + y 2 as k varies
Forecast: small k should stay a bowl; large k should tip into a saddle. There must be a threshold value of k where it flips.
Step 1 — Critical point. f x = 2 x + k y , f y = k x + 2 y . At ( 0 , 0 ) both vanish for every k , so ( 0 , 0 ) is always critical. Why this step? No linear terms — the origin is fixed as the critical point regardless of k , so we can study one point while k moves.
Step 2 — Second partials. f xx = 2 , f y y = 2 , f x y = k .
Why this step? Here the tilt term f x y = k is the tunable knob; isolating it shows the parameter enters the test only through the cross-curvature.
Step 3 — Discriminant as a function of k .
D ( k ) = ( 2 ) ( 2 ) − k 2 = 4 − k 2
Why this step? The whole verdict now rides on the sign of 4 − k 2 .
Step 4 — Case split on k .
∣ k ∣ < 2 → D > 0 and f xx = 2 > 0 → minimum . Why: small tilt keeps both curvatures dominant and same-signed, so the bowl survives.
∣ k ∣ > 2 → D < 0 → saddle . Why: a large cross-term overpowers the diagonal curvatures, forcing opposite-sign directions.
∣ k ∣ = 2 → D = 0 → inconclusive , must check by hand. Two symmetric sub-cases:
k = + 2 : f = x 2 + 2 x y + y 2 = ( x + y ) 2 ≥ 0 , a degenerate minimum , flat along the line x = − y (where x + y = 0 ). Why flat there: on that line f = 0 = f ( 0 , 0 ) , a valley floor rather than a single low point.
k = − 2 : f = x 2 − 2 x y + y 2 = ( x − y ) 2 ≥ 0 , also a degenerate minimum , flat along x = y (where x − y = 0 ). Why the mirror: flipping the sign of k mirrors the flat valley to the other diagonal.
The figure plots D ( k ) = 4 − k 2 against k . The blue region (D > 0 ) is where the origin is a minimum; the pink regions (D < 0 ) are saddles; the yellow dots at k = ± 2 mark the D = 0 thresholds where the verdict flips and the valley goes flat. Reading left to right you see the single parameter carry the point from saddle → min → saddle.
Verify: at k = 1 , D = 3 > 0 (min); at k = 3 , D = 4 − 9 = − 5 < 0 (saddle); at k = 2 , D = 0 and f = ( x + y ) 2 ≥ 0 flat along x + y = 0 ; at k = − 2 , D = 0 and f = ( x − y ) 2 ≥ 0 flat along x − y = 0 ✓. Threshold at ∣ k ∣ = 2 confirmed.
Recall Which cell was hardest, and why?
Cells F and G — because D = 0 makes the Hessian matrix blind. Question ::: The Hessian only sees second-order curvature; when both eigenvalues are 0 , the true shape hides in higher-order terms and you must inspect f directly.
Mnemonic The full decision walk
"D < 0 ? Saddle, done. D > 0 ? Read f xx for smile/frown. D = 0 ? Roll up sleeves."
Recall Self-test across the matrix
Give an f where f xx = 0 yet the test still gives a verdict. Which cell?
Two functions share D = 0 at the origin but differ in verdict — name them.
For f = x 2 + k x y + y 2 , at what ∣ k ∣ does the origin stop being a minimum?
What verdict does D < 0 give, regardless of f xx ? Saddle point.
For f = x 2 + x y + y 2 + 3 x , where is the critical point and its type? ( − 2 , 1 ) , local minimum (D = 3 > 0 , f xx = 2 > 0 ).
For f = x 3 − 12 x + y 3 − 3 y , classify ( 2 , − 1 ) . Saddle (D = 36 x y = − 72 < 0 ).
When f xx = 0 but D < 0 , is the test valid? Yes — D < 0 gives a saddle and never uses f xx .
Why can D > 0 never coexist with f xx = 0 ? Then D = − f x y 2 ≤ 0 , contradicting D > 0 .
For f = x 4 + y 4 at origin: D and true type? D = 0 ; genuine minimum (found by inspecting f > 0 ).
For f = x 4 − y 4 at origin: D and true type? D = 0 ; saddle (up along x , down along y ).
Box of volume 32 minimising surface: dimensions? 4 × 4 × 2 m, surface 48 m 2 .
For f = x 2 + k x y + y 2 , threshold ∣ k ∣ flipping min→saddle? ∣ k ∣ = 2 (D = 4 − k 2 ).