# Procedure for finding local and endpoint extreme values using the higher derivative test

This article describes the procedure for finding the local and endpoint extreme values for a twice differentiable function using the second derivative test, where, in cases that the test is inconclusive, we switch to the higher derivative test.

## Procedure for twice differentiable function on an interval

Suppose is a continuous function on an interval (may be open, closed, half-closed, or infinite in one or both directions). Further, suppose is defined everywhere on the interior of the interval. Then the procedure is as follows:

- Compute the formal expressions for the first derivative and the second derivative (note that for the method to apply, both these must be defined everywhere on the interior of the interval).
- Find all the points where takes the value zero. These are precisely the critical points for .
- Evaluate at each of these critical points and determine the
*sign*of on each critical point. Then, by the second derivative test:- Any critical point where takes a negative value is a point of local maximum for .
- Any critical point where takes a positive value is a point of local minimum for .
- For a critical point where takes the value zero, the second derivative test is inconclusive, i.e., the point may be a point of local maximum, local minimum, or neither -- we don't know yet.

- If there are points where the second derivative test is inconclusive, compute the formal expression for the third derivative. Evaluate the third derivative at all the points where the second derivative test has been inconclusive. For those points where the third derivative is nonzero, we can conclude that the point is neither a point of local maximum nor a point of local minimum. For those points where the third derivative evaluates to zero, the test is still inconclusive. If there are such points, we pass to the next derivative.
- The overall procedure is as follows: We keep formally computing more derivatives until all the critical points have some derivative evaluated to a nonzero value. If the first nonzero value occurs at an odd derivative, then the point is not a point of local max/min. If the first nonzero value occurs at an even derivative, then the point is a point of local max/min -- max if the value is negative, and min if the value is positive.
- For the endpoints: If the one-sided derivative exists and is nonzero at an endpoint, we can simply use the sign of that to determine the nature of the endpoint extreme value. If the one-sided derivative value is zero, we can use the one-sided version of second derivative test at the endpoint, and if that fails, then the one-sided version of higher derivative test.

Note that this test may run into inconclusive situations. For instance, it may be the case that higher derivatives cease to exist before becoming nonzero. It may also be the case that all the higher derivative values are zero, in which case the test is again inconclusive. However, the higher derivative test does settle a lot of situations that are left ambiguous by the second derivative test.

### Case of function with periodic derivative and infinitely many critical points

If is a periodic function, say with period , then its set of critical points is invariant under translation by . This means that if is a critical point, so is for any .

In this case, it is obviously not feasible to do a sign analysis of separately for any critical point. However, the good news is that we do not need to. It suffices to do the sign analysis of values of at critical ponits over a *single* period and then extrapolate to the entire domain.

Note that this remark applies even if *itself* is not a periodic function. For instance, it applies to the study of functions of the form (linear) + (trigonometric), such as .

### Example of a polynomial function

Consider the function:

We follow the procedure:

- Computation of and : and .
- Points where takes the value 0: We have . The roots are . These are all in the interval , hence are precisely the critical points of .
- Evaluate the sign of at each critical point:
- At the critical point : , so -1 is a point of local maximum for .
- At the critical point : , so the second derivative test is inconclusive at 0.
- At the critical point : , so 1 is a point of local minimum for .

- We notice that there is a critical point, namely , for which the second derivative test has been inconclusive. We thus compute the third derivative formally and evaluate at this point. The third derivative is . Evaluation at 0 gives . Since this is nonzero, we conclude that is not a point of local extremum.
- (The next step, involving higher derivatives, is unnecessary).
- For the endpoints: The one-sided derivatives at the endpoints are given by the same formal expression as the derivative within the interval.
- The right-hand derivative at -2 is , so by the one-sided derivative test, we obtain an endpoint minimum at -2.
- The left-hand derivative at 3 is , so by the one-sided derivative test, we obtain an endpoint maximum at 3.

We can also compute the local and endpoint extreme values:

- The value at (endpoint minimum) is .
- The value at (local maximum) is .
- The value at (local minimum) is .
- The value at (endpoint maximum) is .