Derivatives

Learn about derivatives and their importance in optimization problems.

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 greater. The minimum among all local minima of ff is the global minimum of ff and the maximum among all local maxima of ff is the global maximum.

All points where f(x)=0f'(x) = 0 are candidates to be a local minimum or a local maximum. So the first thing to do is to find all those points. But how can we differentiate a minimum from a maximum? Well, let’s look again at the last figure.

At a local minimum, the function stops going down and begins going up. In a local maximum, the function does quite the opposite. Then, to differentiate a minimum from a maximum, we just need to analyze the sign of ff' before and after the point.

For example, consider f(x)=x2f(x) = x^2 ...