## What are extrema of functions?

An extremum (plural extrema) is a point of a function at which it has the highest (maximum) or lowest (minimum) value. A global maximum or minimum is the highest or lowest value of the entire function, whereas a local maximum or minimum is the highest or lowest value in its neighbourhood.

Extrema can be found where the function changes from rising to falling or vice versa (see monotonicity). Think about it this way: if you are going up a hill and want to find its highest point, it would be right before the hill begins to decline again. In particular, the slope of the hill is zero at this point. If it wasn’t zero, it would mean that the your path is still going up. Hence, we need to find all points of a function at which its slope is zero. We use the first derivative for this. To find the points where the slope is zero, we need to find the roots of the derivative. The roots of the derivative can potentially be extrema but not necessarily. Think of the hill again. When the slope becomes zero and you are walking neither up nor down, we would only be at a maximum if the hill started falling from here. However, what if the hill starts to go up again? In this case, we don’t have a maximum. Finding the roots of the derivative is just the first step. After that, we need to decide if we have a maximum, minimum or neither.

## Finding potential extrema

Consider the following function and its first derivative:

(1)

We now find the roots of the derivative by setting it zero and solving for :

(2)

We have potential extrema at and but we still need to determine whether they are minima or maxima (or neither). We don’t have either if the function is rising (or falling) on the left and rising (or falling) on the right of the potential extremum (so when there is no change). We have a maximum when it is rising first and then falling, and a minimum when it changed from falling to rising. We use the same method that we used to find the function’s monotonicity. We can either compare the sign of the value of the first derivative on the left and right side of the point in question. Or we can use the second derivative and check the sign of it at the point in question. If it is positive then we have a minimum, and a maximum if it is negative (and indeed neither if it is zero). The second derivative and its values at and :

(3)

We see that , meaning we have a maximum at , and meaning we have a minimum at . The following graph illustrates this. The function is shown in red and we can see the maximum at 1 and the minimum at 4. The first derivative is drawn in purple and we observe that it crosses the x-axis at those points. Finally, the second derivative is shown in orange and it has a negative value where we can see the maximum of and a positive value where we see the minimum of .

### No extremum

As an example where the root of the first derivative is not an extremum, consider the following function and its derivatives:

(4)

The following graph shows us that, although the derivative (purple) has a root at , it is not an extremum of the function (red). This is can be shown with the second derivative (orange) because it is zero at this point.