Second Derivative Test

Calculus & Advanced Math

The second derivative test classifies a critical point using the sign of the second derivative: positive means local min, negative means local max.

Formula

f'(c)=0: \text{ if } f''(c)>0 \text{ then min; if } f''(c)<0 \text{ then max}

Definition

At a critical point, the second derivative test checks whether the curve bends upward or downward there. Bending up (positive second derivative) means a valley (local min). Bending down (negative) means a hilltop (local max).

Example

$f(x) = x^2$: $f'(x) = 2x = 0$ at $x = 0$. $f''(x) = 2 > 0$ everywhere. Positive second derivative means the curve bends up, confirming $x = 0$ is a local minimum.

Key Insight

Think of concavity: if the cup opens up at the critical point, you are at the bottom (min). If it opens down, you are at the top (max).

Definition

If $f'(c) = 0$ and $f''(c) > 0$, then $c$ is a local minimum. If $f''(c) < 0$, then $c$ is a local maximum. If $f''(c) = 0$, the test is inconclusive and you must use the first derivative test or analyze higher derivatives.

Example

$f(x) = x^3 - 12x$: $f' = 3x^2 - 12 = 0$ at $x = \pm 2$. $f'' = 6x$. $f''(2) = 12 > 0$ (local min). $f''(-2) = -12 < 0$ (local max).

Key Insight

The second derivative test is quick and clean when it works, but it fails when $f''(c) = 0$. The first derivative test is the fallback.

Definition

The second derivative test is a special case of the general critical-point classification using the Taylor expansion. When $f'(c) = 0$, the sign of $f''(c)$ determines whether the quadratic term in the Taylor expansion creates a local min or max. In multivariable calculus, the test uses the eigenvalues of the Hessian matrix.

Example

For $f(x,y)$ at a critical point, compute $H = \begin{bmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{bmatrix}$. If $\det(H) > 0$ and $f_{xx} > 0$: local min. $\det(H) > 0$ and $f_{xx} < 0$: local max. $\det(H) < 0$: saddle point.

Key Insight

The Hessian-based second derivative test directly generalizes to optimization in machine learning, where second-order methods (Newton's method, quasi-Newton) use curvature information to converge faster than gradient descent.