Lesson Explainer: Second Derivative Test for Local Extrema | Nagwa Lesson Explainer: Second Derivative Test for Local Extrema | Nagwa

Lesson Explainer: Second Derivative Test for Local Extrema Mathematics • Third Year of Secondary School

Join Nagwa Classes

Attend live Mathematics sessions on Nagwa Classes to learn more about this topic from an expert teacher!

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 𝑓(𝑥)=0, 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, 𝑓(𝑥)=0.

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 𝑥=0. Since 𝑓(𝑥)=3𝑥, we can see that 𝑓(0)=0, 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 𝑥=0 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 𝑓(𝑥)>0, the point is a local minimum;
  • if 𝑓(𝑥)<0, the point is a local maximum.
  • if 𝑓(𝑥)=0, 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 𝑦=𝑥+4𝑥6 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 dd𝑦𝑥|||=0.

Given that the function is twice differentiable, we can use the second derivative test which states that if dd𝑦𝑥|||=0 and dd𝑦𝑥|||<0 at some 𝑥, then the function has a local maximum value at 𝑥, whereas if dd𝑦𝑥|||=0 and dd𝑦𝑥|||>0, then it has a local minimum value at 𝑥. Finally, if dd𝑦𝑥|||=0 and dd𝑦𝑥|||=0, then the second derivative test is inconclusive at 𝑥. We, therefore, begin by calculating the derivative of the function 𝑦=𝑥+4𝑥6. Since we have a polynomial, we can use the power rule to differentiate each term to get dd𝑦𝑥=2𝑥+4.

We can find the stationary points of the function by solving dd𝑦𝑥=0 for 𝑥 as follows: 0=2𝑥+4.

Adding 2𝑥 to both sides of the equation, we have 2𝑥=4𝑥=2.

We can now find the second derivative of the function dd𝑦𝑥=2.

Since dd𝑦𝑥 is negative for all 𝑥, it is also negative at 𝑥=2. Therefore, the function 𝑦=𝑥+4𝑥6 has a local maximum at 𝑥=2.

We can now substitute 𝑥=2 into the equation 𝑦=𝑥+4𝑥6 to find the maximum value: 𝑦=(2)+4(2)6=4+86=2.

Thus, the function 𝑦=𝑥+4𝑥6 has a maximum at (2,2).

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 𝑦=𝑥+3𝑥16 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 dd𝑦𝑥|||=0.

Given that the function is twice-differentiable, we can use the second derivative test which states that if dd𝑦𝑥|||=0 and dd𝑦𝑥|||<0 at some 𝑥, then the function has a local maximum value at 𝑥, whereas if dd𝑦𝑥|||=0 and dd𝑦𝑥|||>0, then it has a local minimum value at 𝑥. Finally, if dd𝑦𝑥|||=0 and dd𝑦𝑥|||=0, then the second derivative test is inconclusive at 𝑥. We, therefore, begin by calculating the first and second derivatives of the function 𝑦=𝑥+3𝑥16. Since we have a polynomial, we can use the power rule to differentiate each term to get dd𝑦𝑥=3𝑥+6𝑥.

Differentiating again, we have dd𝑦𝑥=6𝑥+6.

We can find the stationary points of the function by setting dd𝑦𝑥=0 and solving for 𝑥 as follows: 3𝑥+6𝑥=0; by factoring, we get 3𝑥(𝑥+2)=0.

Hence, the function has stationary points at 𝑥=0 and 𝑥=2. We can now evaluate the second derivative at each point to determine the nature of the stationary point. Beginning with 𝑥=0, we substitute this value into the equation for the second derivative as follows: dd𝑦𝑥|||=6(0)+6=6.

Since dd𝑦𝑥>0 at 𝑥=0, we have a local minimum at 𝑥=0. We can now find the value of the function at this point by substituting 𝑥=0 into the expression for 𝑦 as follows: 𝑦=(0)+3(0)16=16.

Hence, at (0,16), the function has a local minimum.

Similarly, for 𝑥=2, we can find the value of dd𝑦𝑥 at this point by substituting 𝑥=2 into the expression for the second derivative as follows: dd𝑦𝑥|||=6(2)+6=6.

Since dd𝑦𝑥<0 at 𝑥=2, we have a local maximum at 𝑥=2. We can now find the value of the function at this point by substituting 𝑥=2 into the expression for 𝑦 as follows: 𝑦=(2)+3(2)16=8+1216=12.

Thus, the function 𝑦=𝑥+3𝑥16 has a local minimum at (0,16) and a local maximum at (2,12).

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 𝑓(𝑥)=3𝑥2𝑥.

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 𝑓(𝑥)=0.

Given that the function is twice-differentiable, we can use the second derivative test which states that if, for some 𝑥, 𝑓(𝑥)=0 and 𝑓(𝑥)<0, then the function has a local maximum value at 𝑥, whereas if 𝑓(𝑥)=0 and 𝑓(𝑥)>0, then it has a local minimum value at 𝑥. After this sentence add: Finally, if 𝑓(𝑥)=0 and 𝑓(𝑥)=0, 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: 𝑓(𝑥)=12𝑥6𝑥.

Differentiating again, we have 𝑓(𝑥)=36𝑥12𝑥=12𝑥(3𝑥1).

To find the stationary points of 𝑓, we set 𝑓(𝑥)=0 and solve for 𝑥: 12𝑥6𝑥=0.

Factoring out 6𝑥, we have 6𝑥(2𝑥1)=0.

Hence, 𝑓 has stationary points when 𝑥=0 or 𝑥=12. We will now try to apply the second derivative test by evaluating the second derivative at the points 𝑥=0 and 𝑥=12. Beginning with 𝑥=0, substituting this into the equation for the second derivative, we find that 𝑓(0)=12(0)(3(0)1)=0.

In this case, the second derivative test is inconclusive and we need to consider the values of 𝑓(𝑥) in the immediate neighborhood of 𝑥=0. Writing 𝑓(𝑥) in factored form, we have 𝑓(𝑥)=6𝑥(2𝑥1).

Since 6𝑥>0 for all 𝑥0, the sign of 𝑓 around zero is completely determined by 2𝑥1. This is negative for all 𝑥<12, 𝑓(𝑥)<0 for all 𝑥0. Therefore, the stationary point is an inflection point.

We now consider the point 𝑥=12. Substituting this value into the expression for the second derivative, we have 𝑓12=12123121=6321=612=3.

Since 𝑓12>0, the function 𝑓(𝑥)=3𝑥2𝑥 has a local minimum at 𝑥=12. Finally, we can find the minimum value by substituting 𝑥=12 into the expression for 𝑓(𝑥) as follows: 𝑓12=312212=3116218=31628=116.

Thus, 12,116 is a local minimum of the function 𝑓(𝑥)=3𝑥2𝑥.

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 𝑓(𝑥)=2𝑥4𝑥.

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 𝑓(𝑥)=0.

Given that we have a radical function with even roots, the function is only defined for 𝑥0. We remember that a local extremum is only defined for an interior point of the domain. Since 𝑥=0 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 𝑥>0, we have a twice-differentiable function, so we can apply the second derivative test. Given a differentiable function 𝑓 with a stationary point at 𝑥,

  • if 𝑓(𝑥)>0, the point is a local minimum;
  • if 𝑓(𝑥)<0, the point is a local maximum.
  • if 𝑓(𝑥)=0, 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: 𝑓(𝑥)=2𝑥4𝑥.

We can now apply the power rule to differentiate each term: 𝑓(𝑥)=𝑥𝑥.

Differentiating again, we have 𝑓(𝑥)=12𝑥+34𝑥.

We can now find the stationary points of the function by setting the first derivative equal to zero and solving for 𝑥 as follows: 0=𝑥𝑥.

Multiplying through by 𝑥, we have 0=𝑥1.

Hence, 𝑥=1.

Therefore, 𝑓 has a stationary point at 𝑥=1. We can now evaluate the second derivative at this point to determine the nature of the stationary point. Substituting 𝑥=1 into the expression for the second derivative, we have 𝑓(1)=12(1)+34(1)=12+34=14.

Since 𝑓(1)>0, 𝑓 has a local minimum at 𝑥=1. To find the minimum value, we substitute 𝑥=1 into the expression for 𝑓 as follows: 𝑓(1)=2141=24=2.

Therefore, the function 𝑓(𝑥)=2𝑥4𝑥 has a local minimum at (1,2).

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 𝑦=7𝑥+7𝑥.

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 dd𝑦𝑥|||=0.

Since the function 𝑦=7𝑥+7𝑥 is twice-differentiable for all 𝑥0, 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 dd𝑦𝑥|||<0, the point is a local minimum;
  • if dd𝑦𝑥|||>0, the point is a local maximum.
  • if dd𝑦𝑥|||=0, 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 dd𝑦𝑥=77𝑥.

Differentiating again, we have dd𝑦𝑥=14𝑥.

We now find the stationary points of the function by setting dd𝑦𝑥=0 and solving for 𝑥 as follows: 0=77𝑥.

Multiplying the equation through by 𝑥 and dividing by 7, we have 0=𝑥1.

Hence, the function has stationary points at 𝑥=1 and 𝑥=1.

Beginning with 𝑥=1, we substitute this into the equation for the second derivative to find dd𝑦𝑥|||=141=14.

Since dd𝑦𝑥|||>0, the function 𝑦=7𝑥+7𝑥 has a local minimum at 𝑥=1. We can now find the value of this local minimum by substituting 𝑥=1 into the equation 𝑦=7𝑥+7𝑥: 𝑦=7(1)+71=14.

Hence, the function has a local minimum value of 14 at 𝑥=1.

We now consider the second stationary point. Substituting 𝑥=1 into the equation for the second derivative, we have dd𝑦𝑥|||=14(1)=14.

Since dd𝑦𝑥|||<0, the function 𝑦=7𝑥+7𝑥 has a local maximum at 𝑥=1. Finally, we can find the value of this local maximum by substituting 𝑥=1 into the equation 𝑦=7𝑥+7𝑥 to get 𝑦=7(1)+71=14.

Thus, the function 𝑦=7𝑥+7𝑥 has a local maximum value of 14 at 𝑥=1 and a local minimum value of 14 at 𝑥=1.

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 𝑓(𝑥)=5𝑥3+2𝑥16𝑥ln, 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 𝑓(𝑥)=0.

Since ln𝑥 is only defined for positive 𝑥, the domain of our function is 𝑥>0. 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 𝑓(𝑥)>0, the point is a local minimum;
  • if 𝑓(𝑥)<0, the point is a local maximum.
  • if 𝑓(𝑥)=0, the second derivative test is inconclusive.

We begin by finding the first and second derivatives of 𝑓. Recall that the derivative ddln𝑥𝑥=1𝑥. Therefore, using the power rule to differentiate the other terms, we have 𝑓(𝑥)=103𝑥+216𝑥.

Differentiating again, we have 𝑓(𝑥)=103+16𝑥.

We now find the stationary points of 𝑓 by setting 𝑓(𝑥)=0 and solving for 𝑥 as follows: 0=103𝑥+216𝑥.

Multiplying through by 6𝑥, we have 0=20𝑥12𝑥+1.

This equation can be factored as follows: 0=(10𝑥1)(2𝑥1).

Therefore, 𝑓 has stationary points at 𝑥=110 and 𝑥=12. 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 𝑥=110 and substituting this into the expression for the second derivative, we have 𝑓110=103+16=103+1006=403.

Since 𝑓110>0, the function has a local minimum at 𝑥=110. We can find the value of this minimum by substituting 𝑥=110 into the expression for 𝑓 as follows: 𝑓110=53+211016110=5300+21016110=116016110.lnlnln

Therefore, the function has a local minimum of 116016110ln at 𝑥=110.

We can now consider the nature of the other stationary point 𝑥=12. Substituting this value into the expression for the second derivative yields 𝑓12=103+16=103+46=83.

Since 𝑓12<0, the function has a local maximum at 𝑥=12. We can find the value of this maximum by substituting 𝑥=12 into the expression for 𝑓 as follows: 𝑓12=53+2121612=512+11612=7121612.lnlnln

Therefore, the function 𝑓(𝑥)=5𝑥3+2𝑥16𝑥ln has a local maximum of 7121612ln at 𝑥=12 and a local minimum of 116016110ln at 𝑥=110.

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 𝑓(𝑥)>0, the point is a local minimum;
    • if 𝑓(𝑥)<0, the point is a local maximum.
    • If 𝑓(𝑥)=0, 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.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy