4.10.18 · D4Advanced Topics (Elite Level)

Exercises — First-order optimality conditions — gradient = 0

2,010 words9 min readBack to topic

Before we start, let us re-earn every symbol so line one is readable by anyone.

Figure — First-order optimality conditions — gradient = 0

Level 1 — Recognition

You only need to spot stationary points and read a graph.

Recall Solution L1.1

What we do: find where the slope is flat. Why: an interior optimum forces . . Set . The stationary point is (and ).

Recall Solution L1.2

(a) , at gives yes (a minimum). (b) , at gives yes (but an inflection, not an extremum). (c) , at gives yes (a maximum, since is the peak). (d) , at gives yes (a saddle). All four are stationary; only some are extrema — exactly the FONC warning.

Recall Solution L1.3

False. is necessary for an interior optimum, not sufficient. Counterexample at : flat but neither max nor min.


Level 2 — Application

Now compute gradients and solve for the candidates.

Recall Solution L2.1

. Set or . Two stationary points: and .

Recall Solution L2.2

. Set each to zero: ; . Stationary point , with .

Recall Solution L2.3

. Solve the system From the first, . Substitute: , so . Stationary point ; . ✓


Level 3 — Analysis

Classify the candidates using the Hessian, and cover every sign case.

Recall Solution L3.1

. At : local maximum, value . At : local minimum, value .

Recall Solution L3.2

. So and . ⟹ local minimum (in fact global — the function is convex). Value .

Recall Solution L3.3

. Set : ; . Two candidates: and . Second slopes: , so .

  • At : minimum, value .
  • At : saddle, value .
Figure — First-order optimality conditions — gradient = 0

Level 4 — Synthesis

Combine FONC with proof, constraints, and algorithm.

Recall Solution L4.1

Errors: at the three points equals , , . . Why FONC: the minimum of this smooth bowl is interior, so . System: and . Subtract: . Then . Best-fit line . (This is exactly the least-squares normal-equation logic.)

Recall Solution L4.2

(a) Substitute : . , so , . (b) Lagrangian . FONC on : . With : . Same answer . The boundary gradient does not vanish here — the constraint absorbs the leftover slope, which is exactly why plain FONC fails on constrained problems.

Recall Solution L4.3

; at it is . Descent rule: . , . New point . The stationary point is where ; distance dropped from to . Closer. ✓


Level 5 — Mastery

Prove and generalise.

Recall Solution L5.1

Local max: with for , so the numerator .

  • Right, : numerator , denominator ⟹ quotient .
  • Left, : numerator , denominator ⟹ quotient . Both ⟹ . The differentiability makes the two one-sided limits equal, and we trapped that common value at .
Recall Solution L5.2

Recall (the directional derivative). Take . Then , so increases along — beats a maximum. Take . Then , so decreases — beats a minimum. Since we can strictly improve in both the max sense and the min sense, is neither. Contrapositive: any interior extremum has .

Recall Solution L5.3

only at . Second slopes: ; at origin all are , so — the test fails. But directly for all , with equality only at the origin. So is a strict global minimum. The moral: when , fall back to inspecting the function itself.

Recall Solution L5.4

Let be stationary, . Plug into the convexity inequality: Hence everywhere — a global minimum. This is why convexity turns the mere shortlist "stationary" into the guaranteed winner.


Recall Feynman check: what did this whole page really teach?

FONC () is a net that catches every interior peak, valley, and saddle. Levels 1–2 taught you to cast the net (solve the system). Level 3 taught you to sort the catch (Hessian ). Level 4 handled fish that swim near walls (constraints, algorithms). Level 5 proved why the net works and when the sort fails. Flat is a finalist — the Hessian, convexity, or direct inspection crowns the winner.

Connections