liveBook · Manning

Locally optimal solution

As explained in Geometry for Programmers

A local minimum is a point whose function value is no greater than the values at all sufficiently nearby inputs.

A local minimum is a point where a function stops decreasing and begins increasing. Nearby inputs have no lower function value, even if the function falls lower elsewhere. A local minimum can therefore also be a global minimum, but it does not have to be. section 6.1.2

Finding a minimum on a cubic

For P(x) = x³ − x² − 2x + 1, the derivative is P′(x) = 3x² − 2x − 2. A local minimum occurs where the derivative changes from negative to positive, so finding derivative roots helps locate the curve’s bumps. A root alone is not enough: the derivative may touch the axis without changing sign, producing no extremum. section 6.1.2

Figure 6.5 A cubic polynomial (two bumps, three roots) and its derivative, which is a quadratic polynomial (two roots)
06-05

Compare the cubic’s two bumps with the roots of its quadratic derivative. section 6.1.2

How Geometry for Programmers covers it

How deep it goes
Defines the geometric turn, links it to derivative roots and sign changes, and notes that a derivative root alone may not produce an extremum.
Examples
Uses a cubic polynomial, its quadratic derivative, plotted bumps, and a derivative root that does not create an extremum.
What you can do after
Evaluate/understand local minima by interpreting derivative roots and checking whether the derivative changes from negative to positive.
How it connects
Connects local minima to derivatives, local maxima, global minima, and polynomial functions.

Also explained in

Compare how 9 books explain locally optimal solution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.