In this explainer, we will learn how to classify local extrema using the second derivative test.
Finding local maxima and minima is essential for solving many problems in mathematics and physics. For example, light travels along the path that minimizes the total time, and the equilibrium position of many systems is the position of minimal energy. Examples such as these lead mathematicians and physicists to develop a rich theory and many techniques for finding maxima and minima. In this explainer, we will focus on one particular technique for classifying stationary points as maxima or minima by using the second derivative.
Let us begin by recalling the definitions of local extrema and stationary points.
Definition: Local Extrema
A function has a local maximum at if for all near . When we say near , to be precise, we mean that there exists some open interval around on which for all . Similarly, has a local minimum at if for all near .
Definition: Stationary Points
A stationary point of a differentiable function is a point on the graph of where the derivative is zero. That is, when , we say that has a stationary point at .
An important theorem in calculus links local extrema to stationary points; it is called Fermat’s theorem. It states the following.
Theorem: Fermat’s Theorem
If has a local maximum or minimum at a point and exists, then has a stationary point at ; that is, .
Recall that the converse statement to Fermat’s theorem is not true; it is possible to have a stationary point which is not a maximum or a minimum.
For example, consider the function at . Since , we can see that , which means that is stationary at 0. However, we remember from the graph of the cube function that it does not have any local maximum or minimum. Hence, a function can have a stationary point which is not a local extremum.
In this explainer, we will consider how we can use the second derivative to classify stationary points as maxima or minima.
The second derivative tells us about the rate of change of the slope of a curve. Therefore, let us consider how the slop of a curve changes around a stationary point. We begin by considering a local minimum. To the left of a local minimum, the derivative is negative; at the local minimum, the derivative is zero; and on the right of the local minimum, the derivative is positive.
This tells us that around a local minimum the derivative is increasing. Given that the derivative of a function can be considered as a function, we can use the properties of the derivative to make conclusions about its behavior. In particular, recall that if a given function has a positive derivative, then it is increasing. Therefore, if the second derivative, if it exists, is positive at a stationary point, we can conclude that the first derivative is increasing and consequently that we have a local minimum. Using this method to classify stationary points is called the second derivative test.
We can similarly consider how the derivative changes around a local maximum. To the left of a local maximum, the derivative is positive; at the local maximum, the derivative is zero; and on the right of the local maximum, the derivative is negative.
Therefore, using a similar argument, we can conclude that if the second derivative is negative, the stationary point is a local maximum.
Interestingly, if the second derivative is zero, then we cannot conclude anything about the nature of the stationary point. For example, consider the functions and ; both have a stationary point at and both their second derivatives at this point are zero. However, ’s stationary point is not a local extremum, whereas ’s is a minimum.
In summary, we can state the second derivative test for local extrema.
Theorem: Second Derivative Test for Local Extrema
Given a twice-differentiable function with a stationary point at ,
- if , the point is a local minimum;
- if , the point is a local maximum.
- if , the second derivative test is inconclusive.
We will now consider a number of examples where we apply the second derivative test to classify extrema.
Example 1: Finding Local Maxima and Minima
Find, if any, the point where has a local maximum or local minimum.
Answer
Since the given function is a polynomial, we know that its second derivative exists everywhere. Fermat’s theorem which tells us that any local extrema of a differentiable function must occur at a stationary point, that is, at where .
Given that the function is twice differentiable, we can use the second derivative test which states that if and at some , then the function has a local maximum value at , whereas if and , then it has a local minimum value at . Finally, if and , then the second derivative test is inconclusive at . We, therefore, begin by calculating the derivative of the function . Since we have a polynomial, we can use the power rule to differentiate each term to get
We can find the stationary points of the function by solving for as follows:
Adding to both sides of the equation, we have
We can now find the second derivative of the function
Since is negative for all , it is also negative at . Therefore, the function has a local maximum at .
We can now substitute into the equation to find the maximum value:
Thus, the function has a maximum at .
It is often worth sanity-checking our answer using our general mathematical knowledge. For example, the function we were given is a quadratic function with a negative coefficient; therefore, we would expect the function to have a single maximal value which is what we found.
Example 2: Using the Second Derivative Test
Find, if any, the points where has a local maximum or local minimum.
Answer
Since the given function is a polynomial, we know that its second derivative exists everywhere. Fermat’s theorem which tells us that any local extrema of a differentiable function must occur at a stationary point, that is, at where .
Given that the function is twice-differentiable, we can use the second derivative test which states that if and at some , then the function has a local maximum value at , whereas if and , then it has a local minimum value at . Finally, if and , then the second derivative test is inconclusive at . We, therefore, begin by calculating the first and second derivatives of the function . Since we have a polynomial, we can use the power rule to differentiate each term to get
Differentiating again, we have
We can find the stationary points of the function by setting and solving for as follows: by factoring, we get
Hence, the function has stationary points at and . We can now evaluate the second derivative at each point to determine the nature of the stationary point. Beginning with , we substitute this value into the equation for the second derivative as follows:
Since at , we have a local minimum at . We can now find the value of the function at this point by substituting into the expression for as follows:
Hence, at , the function has a local minimum.
Similarly, for , we can find the value of at this point by substituting into the expression for the second derivative as follows:
Since at , we have a local maximum at . We can now find the value of the function at this point by substituting into the expression for as follows:
Thus, the function has a local minimum at and a local maximum at .
We can apply our mathematical intuition to check our answer. The function we were given is a cubic with a positive coefficient. We would, therefore, expect the function to either have a single inflection point or two turning points: one being maximal and the other minimal. This is exactly what we found. Moreover, given the positive coefficient of , we would expect the local maximum to occur at a point to the left of the local minimum. Once again, this is correctly reflected in our answer.
We will now consider an example where the second derivative test is inconclusive.
Example 3: Classifying Stationary Points
Find the local maxima/minima of the function .
Answer
Since the given function is a polynomial, we know that its second derivative exists everywhere. Fermat’s theorem which tells us that any local extrema of a differentiable function must occur at a stationary point, that is, at where .
Given that the function is twice-differentiable, we can use the second derivative test which states that if, for some , and , then the function has a local maximum value at , whereas if and , then it has a local minimum value at . After this sentence add: Finally, if and , then the second derivative test is inconclusive.
We begin by finding the first and second derivatives of . Since is a polynomial function, we can use the power rule to differentiate each term as follows:
Differentiating again, we have
To find the stationary points of , we set and solve for :
Factoring out , we have
Hence, has stationary points when or . We will now try to apply the second derivative test by evaluating the second derivative at the points and . Beginning with , substituting this into the equation for the second derivative, we find that
In this case, the second derivative test is inconclusive and we need to consider the values of in the immediate neighborhood of . Writing in factored form, we have
Since for all , the sign of around zero is completely determined by . This is negative for all , for all . Therefore, the stationary point is an inflection point.
We now consider the point . Substituting this value into the expression for the second derivative, we have
Since , the function has a local minimum at . Finally, we can find the minimum value by substituting into the expression for as follows:
Thus, is a local minimum of the function .
In a plot of the function, we can see both the inflection point and the minimum.
Example 4: Using the Second Derivative Test with Radical Functions
Find the local maximum and minimum values of .
Answer
Fermat’s theorem which tells us that any local extrema of a differentiable function must occur at a stationary point, that is, at where .
Given that we have a radical function with even roots, the function is only defined for . We remember that a local extremum is only defined for an interior point of the domain. Since is an endpoint of the domain, we can exclude this point as a candidate for local extrema. If we restrict the domain of the function to , we have a twice-differentiable function, so we can apply the second derivative test. Given a differentiable function with a stationary point at ,
- if , the point is a local minimum;
- if , the point is a local maximum.
- if , the second derivative test is inconclusive.
We begin by finding the first and second derivatives of the function. Since we have radical functions, we can apply the power rule for differentiation. We start by rewriting the radicals in terms of exponents as follows:
We can now apply the power rule to differentiate each term:
Differentiating again, we have
We can now find the stationary points of the function by setting the first derivative equal to zero and solving for as follows:
Multiplying through by , we have
Hence,
Therefore, has a stationary point at . We can now evaluate the second derivative at this point to determine the nature of the stationary point. Substituting into the expression for the second derivative, we have
Since , has a local minimum at . To find the minimum value, we substitute into the expression for as follows:
Therefore, the function has a local minimum at .
In a plot of the function, we can clearly see the minimum.
Example 5: Using the Second Derivative Test to Find Maxima and Minima
Find, if any, the local maximum and local minimum values of .
Answer
Fermat’s theorem which tells us that any local extrema of a differentiable function must occur at a stationary point, that is, at where .
Since the function is twice-differentiable for all , we can apply the second derivative test. Recall that the second derivative test states that, given a differentiable function with a stationary point at ,
- if , the point is a local minimum;
- if , the point is a local maximum.
- if , the second derivative test is inconclusive.
We begin by finding the first and second derivatives of the functions. Using the power rule to differentiate each term, we have
Differentiating again, we have
We now find the stationary points of the function by setting and solving for as follows:
Multiplying the equation through by and dividing by 7, we have
Hence, the function has stationary points at and .
Beginning with , we substitute this into the equation for the second derivative to find
Since , the function has a local minimum at . We can now find the value of this local minimum by substituting into the equation :
Hence, the function has a local minimum value of 14 at .
We now consider the second stationary point. Substituting into the equation for the second derivative, we have
Since , the function has a local maximum at . Finally, we can find the value of this local maximum by substituting into the equation to get
Thus, the function has a local maximum value of at and a local minimum value of 14 at .
At first, it might seem strange that the value of the local maximum is less than the value of the local minimum. However, a plot of the graph demonstrates why this is the case.
Example 6: Using the Second Derivative Test to Find Maxima and Minima
Find the local maxima and local minima of , if any.
Answer
Fermat’s theorem which tells us that any local extrema of a differentiable function must occur at a stationary point, that is, at where .
Since is only defined for positive , the domain of our function is . On this domain, the function is twice-differentiable. Therefore, we can use the second derivative test to classify the stationary points. Recall the second derivative test: given a differentiable function with a stationary point at ,
- if , the point is a local minimum;
- if , the point is a local maximum.
- if , the second derivative test is inconclusive.
We begin by finding the first and second derivatives of . Recall that the derivative . Therefore, using the power rule to differentiate the other terms, we have
Differentiating again, we have
We now find the stationary points of by setting and solving for as follows:
Multiplying through by , we have
This equation can be factored as follows:
Therefore, has stationary points at and . We can now consider the value of the second derivative at each of these points to determine whether they are maxima or minima. Beginning with and substituting this into the expression for the second derivative, we have
Since , the function has a local minimum at . We can find the value of this minimum by substituting into the expression for as follows:
Therefore, the function has a local minimum of at .
We can now consider the nature of the other stationary point . Substituting this value into the expression for the second derivative yields
Since , the function has a local maximum at . We can find the value of this maximum by substituting into the expression for as follows:
Therefore, the function has a local maximum of at and a local minimum of at .
A plot of the graph clearly shows the local maximum and minimum of the function.
Key Points
- The second derivative can be used to help classify the maxima and minima of a function.
- The second derivative test states that, given a differentiable function with
a stationary point at ,
- if , the point is a local minimum;
- if , the point is a local maximum.
- If , the second derivative test is inconclusive.
- To apply the second derivative test, we follow the following method:
- Check the twice-differentiability of the function.
- Calculate the first and second derivatives.
- Set the first derivative equal to zero and solve the independent variable.
- Evaluate the second derivative at the zeros of the first derivative and apply the second derivative test.
- To find the maximal and minimal values, substitute the zeros of the derivative into the original function.