We use derivatives to help locate extrema.

### Extrema

We’ll start with some definitions.

- (a)
- A function has an
**global maximum**at , if for every in the domain of the function. - (b)
- A function has an
**global minimum**at , if for every in the domain of the function.

A **global extremum** is either a global maximum or a global minimum.

A local *extremum* of a function is a point on the graph of where the -coordinate is
larger (or smaller) than all other -coordinates of points on the graph whose
-coordinates are “close to” .

- (a)
- A function has a
**local maximum**at , if for every in some open interval I containing . - (b)
- A function has a
**local minimum**at , if for every in some open interval I containing .

A **local extremum** is either a local maximum or a local minimum.

In our next example, we clarify the definition of a local minimum.

Local maximum and minimum points are quite distinctive on the graph of a function, and are therefore useful in understanding the shape of the graph. In many applied problems we want to find the largest or smallest value that a function achieves (for example, we might want to find the minimum cost at which some task can be performed) and so identifying maximum and minimum points will be useful for applied problems as well.

### Critical points

Consider the graph of the function .

**not differentiable**at and . Notice that and .

After this example, the following theorem should not come as a surprise.

Fermat’s Theorem says that the only points at which a function can have a local maximum or minimum are points at which the derivative is zero or the derivative is undefined. As an illustration of the first scenario, consider the plots of and .

At the point , the function has

At the point , the function has

At the point , the function has

At the point , the function has

At the point , the function has

This brings us to our next definition.

**critical point**at if

- You may forget that a maximum or minimum can occur where the derivative does not exist, and so forget to check whether the derivative exists everywhere.
- You might assume that any place that the derivative is zero is a local maximum
or minimum point, but this is not true, consider the plots of and .

Since both local maximum and local minimum occur at a critical point, when we locate a critical point, we need to determine which, if either, actually occurs.

**does not change the sign**on the intervals , , and , because these intervals do not contain any zeros of .

At the critical point where , the function has

At the critical point where , the function has

### The first derivative test

We will further explore and refine the method of the previous section for deciding whether there is a local maximum or minimum at a critical point. Recall that

- If on an interval, then is increasing on that interval.
- If on an interval, then is decreasing on that interval.

So how exactly does the derivative tell us whether there is a maximum, minimum, or
neither at a point? Use the *first derivative test*.

- If to the left of and to the right of , then is a local maximum.
- If to the left of and to the right of , then is a local minimum.
- If has the same sign to the left and right of , then is not a local extremum.

So the critical points (when ) are when , , and . Now we can check points
**between** the critical points to find when is increasing and decreasing:

From this we can make a sign-chart:

Hence is increasing on and and is decreasing on and . Moreover, from the first derivative test, the local maximum is at while the local minima are at and , see the graphs of and .

Hence we have seen that if is zero at a point and increasing on an interval containing that point, then has a local minimum at the point. If is zero at a point and decreasing on an interval containing that point, then has a local maximum at the point. Thus, we see that we can gain information about by studying how changes. This leads us to our next section.

### Inflection points

If we are trying to understand the shape of the graph of a function, knowing where it is concave up and concave down helps us to get a more accurate picture. It is worth summarizing what we have seen already in to a single theorem.

- (a)
- If on an interval, then is concave up on that interval.
- (b)
- If on an interval, then is concave down on that interval.

Of particular interest are points at which the concavity changes from up to down or down to up.

**inflection point**at .

It is instructive to see some examples of inflection points:

It is also instructive to see some nonexamples of inflection points:

We identify inflection points by first finding such that is zero or undefined and then checking to see whether does in fact go from positive to negative or negative to positive at these points.

Note that we need to compute and analyze the second derivative to understand concavity, so we may as well try to use the second derivative test for maxima and minima. If for some reason this fails we can then try one of the other tests.

### The second derivative test

Recall the first derivative test:

- If to the left of and to the right of , then is a local maximum.
- If to the left of and to the right of , then is a local minimum.

If changes from positive to negative it is decreasing. In this case, might be negative,
and if in fact is negative then is definitely decreasing, so there is a local
maximum at the point in question. On the other hand, if changes from
negative to positive it is increasing. Again, this means that might be positive,
and if in fact is positive then is definitely increasing, so there is a local
minimum at the point in question. We summarize this as the *second derivative
test*.

- If , then has a local maximum at .
- If , then has a local minimum at .
- If , then the test is inconclusive. In this case, may or may not have a local extremum at .

The second derivative test is often the easiest way to identify local maximum and minimum points. Sometimes the test fails and sometimes the second derivative is quite difficult to evaluate. In such cases we must fall back on one of the previous tests.