Search⌘ K
AI Features

Derivatives

Explore the role of derivatives in identifying local minima and maxima to solve optimization problems. Learn to calculate derivatives, find candidate points, and classify them using Python's SymPy library, enabling you to efficiently approach single-variable optimization tasks.

In this lesson, we’re going to learn how to use derivatives to solve optimization problems. The derivative of a function tells us a lot of information about that function, including what points could be the local minima or maxima.

Local minima and maxima

Consider the following function:

Points in the colors red and green look quite special. See what happens with the tangent line at those points. The tangent is flat. When a line is flat, its slope is zero.

The slope being zero means the same as f(x)=0f'(x) = 0. It corresponds to the points when ff reaches a local minimum or maximum. Those are the interesting points to us! A local minimum is a point such that there’s no other point around it where ff has a lower value. Analogously, a local maximum is a point such that no point around it makes ff ...