Critical points and the first-derivative test

The idea

A critical point is where the slope is zero (or does not exist). Every smooth local minimum or maximum inside an interval is a critical point, but not every critical point is one. The first-derivative test tells them apart by looking at the sign of the slope just before and just after the point.

The math, with a comment on each formula

f'(c) = 0 \quad \text{(or } f'(c) \text{ undefined)} In words: c is a candidate; the graph is flat (or has a corner) there.

\begin{align*} f' < 0 \text{ before } c,\ f' > 0 \text{ after} &\;\Rightarrow\; \text{local minimum}\\ f' > 0 \text{ before } c,\ f' < 0 \text{ after} &\;\Rightarrow\; \text{local maximum} \end{align*} In words: falling then rising is a valley; rising then falling is a peak; no change of sign is neither.

Worked example

Take f(x) = x^3 - 3x. Its derivative is f'(x) = 3 x^{2} - 3 = 3 \left(x - 1\right) \left(x + 1\right), which is zero at x = -1, 1. Test the sign on each side with one point per stretch: f'(-2) = 9, \qquad f'(0) = -3, \qquad f'(2) = 9 . In words: rising, then falling, then rising again.

So x = -1 is a local maximum with f(-1) = 2, and x = 1 is a local minimum with f(1) = -2. Neither is global: f(3) = 18 is higher than the peak and f(-3) = -18 is lower than the valley, and the curve keeps going in both directions.

Why it matters for optimization

A zero slope finds candidates, not answers. That is why ProvenDecisions labels a nonconvex result locally optimal when a local solver could only show that no nearby point is better. For a convex function the doubt disappears: every critical point is a global minimum (see the refresher on convexity in one variable).