Critical point (source code)

= Critical point
{title2=$\nabla f(x_*)=0$}
{wiki}

For a <smooth function> $f:U\to\mathbb R$ on an <open set> $U\subseteq\mathbb R^n$, a critical point is an input $x_*$ where the <gradient> vanishes: $\nabla f(x_*)=0$. Equivalently, every first <partial derivative> is zero. Such a <critical point> is a <stationary point>; in one variable the condition is $f'(x_*)=0$.

There is a broader convention in elementary one-variable <calculus>: a "critical number" is an <interior> input where the <derivative> is zero or does not exist, provided the <function> itself is defined there. Thus a corner can be a critical number without being a <stationary point>. Here the smooth meaning of <critical point> is used unless the broader convention is explicitly stated. https://openstax.org/books/calculus-volume-1/pages/4-3-maxima-and-minima[Gilbert Strang and Edwin Herman, OpenStax Calculus Volume 1, §4.3: critical numbers]{ref}

For the <polynomial> $f(x)=x^4-2x^2$ on the <real line>,
$$
f'(x)=4x(x^2-1),\qquad f'(-1)=f'(0)=f'(1)=0,\qquad f(-1)=f(1)=-1,\quad f(0)=0.
$$
The <stationary points> at $x=\pm1$ are strict <local minima> and attain the <global minimum>; the <stationary point> at $x=0$ is a strict <local maximum>. One can check the local classifications from $f''(x)=12x^2-4$, which is positive at $\pm1$ and negative at zero. The identity $f(x)=(x^2-1)^2-1\geq-1$ proves the <global minimum> directly. Since $f(x)\to+\infty$ as $|x|\to\infty$, there is no <global maximum> on $\mathbb R$.

\Image[/critical-points-double-well.png]
{title=Three stationary points of $x^4-2x^2$: two global minima and one local maximum}

A zero <derivative> alone does not guarantee an <extremum>. The <polynomial> $g(x)=x^3$ has $g'(0)=0$ but is <strictly increasing> through zero: every <neighbourhood> of zero contains both positive and negative values, so zero is neither a <local minimum> nor a <local maximum>. Conversely, the <absolute value function> $h(x)=|x|$ has a strict <local minimum> and a unique <global minimum> at zero, but its left and right <derivatives> are $-1$ and $+1$. It is not <differentiable> there, so zero is a critical number under the broader convention and is not a <stationary point>.

\Image[/stationary-point-and-corner-minimum.png]
{title=A stationary point without an extremum, and a corner minimum without a derivative}

The usefulness of <critical points> is that they reduce the search for smooth <interior> <extrema> to equations. Every <local minimum> or <local maximum> of a <differentiable function> at an <interior> point has zero <gradient>; this condition is necessary, and $x^3$ shows that it is not sufficient. The striking feature is that all the first <directional derivatives> must vanish together, even though the surrounding values can form a valley, a peak, or a <saddle point of a scalar function>. https://www.ocw.mit.edu/ans7870/18/18.013a/textbook/HTML/chapter14/section01.html[Daniel Kleitman, MIT Calculus with Applications, §14.1: necessary conditions for an interior extremum]{ref}

Proof outline: at an <interior> <local minimum> $x_*$ in one variable, the <difference quotient> $(f(x_*+h)-f(x_*))/h$ is nonnegative for small $h>0$ and nonpositive for small $h<0$. If the <derivative> exists, the two sides have the same limit, forcing $f'(x_*)=0$. Reverse the inequalities for a <local maximum>. In several variables, apply this argument along each coordinate line to obtain zero <partial derivatives> and hence zero <gradient>. At a <domain boundary>, both directions may not be available: $f(x)=x$ on $[0,1]$ attains its <global minimum> at zero although $f'(0)=1$ for its smooth extension.