Learn

Derivative functions contain important information. Let’s look at a couple of examples. Going back to our running example, f(t) describes a runner’s position as a function of time; therefore, the derivative function f’(t) describes the runner’s speed at any time t. Let’s say we have a function s(t) that describes the real-time sales of a particular product; the corresponding derivative function s’(t) describes how those sales are changing in real-time.

Let’s look at the general information we can get as well. If f’(x) > 0, the corresponding function f(x) is increasing. Keep in mind that f(x) itself may be negative even though the derivative f’(x) is positive. The derivative says nothing about the value of the original function, only about how it is changing. Similarly, if f’(x) < 0, then the original function is decreasing.

If f’(x) = 0, then the function is not changing. This can mean one of a few things.

  • It may mean that the function has reached a local maximum (or maxima). A local maximum is a value of x where f’(x) changes from positive to negative and thus hits 0 along the way. In f(x), the local maximum is higher than all the points around it.
  • It may also mean that the function has reached what is called a local minimum. A local minimum is lower than the points around it. When f’(x) goes from negative values to 0 to positive values, a local minimum forms.
  • It may be an inflection point. This is a point where a function has a change in the direction of curvature. For example, the curve of the function goes from “facing down” to “facing up.” Finding inflection points involves a second derivative test, which we will not get to in this lesson.

Global maxima and global minima are the largest or smallest over the entire range of a function.

In machine learning models, maxima and minima are key concepts as they’re usually what we are trying to find when we optimize!

Instructions

The animation to the right outlines our newfound knowledge of extrema. The first image shows a part of a function that is increasing. What do we know about the value of f’(x) in this section of f(x)? Click below to check your answer.

Solution
f'(x) > 0 because the slope of the function is positive.

In the second image, we see a global maximum. This is the largest value over the entire range of the function. What do we know about the value of f’(x) at this point?

Solution
f'(x) = 0 because the slope of the function is going from positive to negative and at the global maximum it is equal to zero,

In the third image, we see a part of the function that is decreasing. What do we know about the value of f’(x) at this point?

Solution
f'(x) < 0 because the slope of the function is negative.

In the fourth image, we see a local minimum. This is the smallest value over a specific range of the function. What do we know about the value of f’(x) at this point?

Solution
f'(x) = 0 because the slope of the function is going from negative to positive and at the local minimum it is equal to zero,

In the final image, we see a local maximum. This is the largest value over a specific range of the function. What do we know about the value of f’(x) at this point?

Solution
f'(x) = 0 because the slope of the function is going from positive to negative and at the local maximum it is equal to zero,

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?