Section 4.5 Derivatives and the Shape of a Graph
Learning Objectives.
Explain how the sign of the first derivative affects the shape of a function’s graph.
State the first derivative test for critical points.
Use concavity and inflection points to explain how the sign of the second derivative affects the shape of a function’s graph.
Explain the concavity test for a function over an open interval.
Explain the relationship between a function and its first and second derivatives.
State the second derivative test for local extrema.
Earlier in this chapter we stated that if a function \(f\) has a local extremum at a point \(c,\) then \(c\) must be a critical point of \(f.\) However, a function is not guaranteed to have a local extremum at a critical point. For example, \(f(x)=x^3\) has a critical point at \(x=0\) since \(f(x)=3x^2\) is zero at \(x=0,\) but \(f\) does not have a local extremum at \(x=0.\) Using the results from the previous section, we are now able to determine whether a critical point of a function actually corresponds to a local extreme value. In this section, we also see how the second derivative provides information about the shape of a graph by describing whether the graph of a function curves upward or curves downward.
Subsection 4.5.1 The First Derivative Test
Corollary \(3\) of the Mean Value Theorem showed that if the derivative of a function is positive over an interval \(I\) then the function is increasing over \(I.\) On the other hand, if the derivative of the function is negative over an interval \(I,\) then the function is decreasing over \(I\) as shown in the following figure.
A continuous function \(f\) has a local maximum at point \(c\) if and only if \(f\) switches from increasing to decreasing at point \(c.\) Similarly, \(f\) has a local minimum at \(c\) if and only if \(f\) switches from decreasing to increasing at \(c.\) If \(f\) is a continuous function over an interval \(I\) containing \(c\) and differentiable over \(I,\) except possibly at \(c,\) the only way \(f\) can switch from increasing to decreasing (or vice versa) at point \(c\) is if \(f'\) changes sign as \(x\) increases through \(c.\) If \(f\) is differentiable at \(c,\) the only way that \(f'.\) can change sign as \(x\) increases through \(c\) is if \(f'(c)=0.\) Therefore, for a function \(f\) that is continuous over an interval \(I\) containing \(c\) and differentiable over \(I,\) except possibly at \(c,\) the only way \(f\) can switch from increasing to decreasing (or vice versa) is if \(f(c)=0\) or \(f'(c)\) is undefined. Consequently, to locate local extrema for a function \(f,\) we look for points \(c\) in the domain of \(f\) such that \(f(c)=0\) or \(f'(c)\) is undefined. Recall that such points are called critical points of \(f.\)
Note that \(f\) need not have a local extrema at a critical point. The critical points are candidates for local extrema only. In Figure 4.58, we show that if a continuous function \(f\) has a local extremum, it must occur at a critical point, but a function may not have a local extremum at a critical point. We show that if \(f\) has a local extremum at a critical point, then the sign of \(f'\) switches as \(x\) increases through that point.
Using Figure 4.58, we summarize the main results regarding local extrema.
If a continuous function \(f\) has a local extremum, it must occur at a critical point \(c.\)
The function has a local extremum at the critical point \(c\) if and only if the derivative \(f'\) switches sign as \(x\) increases through \(c.\)
Therefore, to test whether a function has a local extremum at a critical point \(c,\) we must determine the sign of \(f'(x)\) to the left and right of \(c.\)
This result is known as the first derivative test.
Theorem 4.59. First Derivative Test.
Suppose that \(f\) is a continuous function over an interval \(I\) containing a critical point \(c.\) If \(f\) is differentiable over \(I,\) except possibly at point \(c,\) then \(f(c)\) satisfies one of the following descriptions:
If \(f'\) changes sign from positive when \(x\lt c\) to negative when \(x\gt c,\) then \(f(c)\) is a local maximum of \(f.\)
If \(f'\) changes sign from negative when \(x\lt c\) to positive when \(x\gt c,\) then \(f(c)\) is a local minimum of \(f.\)
If \(f\) has the same sign for \(x\lt c\) and \(x\gt c,\) then \(f(c)\) is neither a local maximum nor a local minimum of \(f.\)
We can summarize the first derivative test as a strategy for locating local extrema.
Note 4.60. Problem-Solving Strategy: Using the First Derivative Test.
Consider a function \(f\) that is continuous over an interval \(I.\)
Find all critical points of \(f\) and divide the interval \(I\) into smaller intervals using the critical points as endpoints.
Analyze the sign of \(f\) in each of the subintervals. If \(f\) is continuous over a given subinterval (which is typically the case), then the sign of \(f\) in that subinterval does not change and, therefore, can be determined by choosing an arbitrary test point \(x\) in that subinterval and by evaluating the sign of \(f\) at that test point. Use the sign analysis to determine whether \(f\) is increasing or decreasing over that interval.
Use Theorem 4.59 and the results of step \(2\) to determine whether \(f\) has a local maximum, a local minimum, or neither at each of the critical points.
Now let’s look at how to use this strategy to locate all local extrema for particular functions.
Example 4.61. Using the First Derivative Test to Find Local Extrema.
Use the first derivative test to find the location of all local extrema for \(f(x)=x^3-3x^2-9x-1.\) Use a graphing utility to confirm your results.
Step 1. The derivative is \(f'(x)=3x^2-6x-9.\) To find the critical points, we need to find where \(f'(x)=0.\) Factoring the polynomial, we conclude that the critical points must satisfy
Therefore, the critical points are \(x=3,-1.\) Now divide the interval \((-\infty,\infty)\) into the smaller intervals \((-\infty,-1),(-1,3) \text{ and } (3,\infty).\)
Step 2. Since \(f\) is a continuous function, to determine the sign of \(f'(x)\) over each subinterval, it suffices to choose a point over each of the intervals \((-\infty,-1),(-1,3) \text{ and } (3,\infty)\) and determine the sign of \(f'\) at each of these points. For example, let’s choose \(x=-2,x=0, \text{ and } x=4\) as test points.
Interval | Test Point | Sign of \(f'(x)=3(x-3)(x+1)\) at Test Point | Conclusion |
---|---|---|---|
\((-\infty,-1)\) | \(x=-2\) | \((\text{ + })(-)(-)=+\) | \(f\) is increasing. |
\((-1,3)\) | \(x=0\) | \((\text{ + })(-)(\text{ + })=-\) | \(f\) is decreasing. |
\((3,\infty)\) | \(x=4\) | \((\text{ + })(\text{ + })(\text{ + })=+\) | \(f\) is increasing. |
Step 3. Since \(f'\) switches sign from positive to negative as \(x\) increases through \(1,f\) has a local maximum at \(x=-1.\) Since \(f'\) switches sign from negative to positive as \(x\) increases through \(3,f\) has a local minimum at \(x=3.\) These analytical results agree with the following graph.
Checkpoint 4.64.
Use the first derivative test to locate all local extrema for \(f(x)=-x^3+\frac{3}{2}x^2+18x.\)
Example 4.65. Using the First Derivative Test.
Use the first derivative test to find the location of all local extrema for \(f(x)=5x^{1/3}-x^{5/3}.\) Use a graphing utility to confirm your results.
Step 1. The derivative is
The derivative \(f'(x)=0\) when \(1-x^{4/3}=0.\) Therefore, \(f'(x)=0\) at \(x=\pm1.\) The derivative \(f'(x)\) is undefined at \(x=0.\) Therefore, we have three critical points: \(x=0,\) \(x=1,\) and \(x=-1.\) Consequently, divide the interval \((-\infty,\infty)\) into the smaller intervals \((-\infty,-1),(-1,0),(0,1),\) and \((1,\infty).\)
Step 2: Since \(f'\) is continuous over each subinterval, it suffices to choose a test point \(x\) in each of the intervals from step \(1\) and determine the sign of \(f'\) at each of these points. The points \(x=-2,x=-\frac{1}{2},x=\frac{1}{2}, \text{ and } x=2\) are test points for these intervals.
Interval | Test Point | Sign of \(f'(x)=\frac{5(1-x^{4/3})}{3x^{2/3}}\) at Test Point | Conclusion |
---|---|---|---|
\((-\infty,-1)\) | \(x=-2\) | \(\frac{(\text{ + })}{(-)+}=-\) | \(f\) is decreasing. |
\((-1,0)\) | \(x=-\frac{1}{2}\) | \(\frac{(\text{ + })}{(\text{ + })+}=+\) | \(f\) is increasing. |
\((0,1)\) | \(x=\frac{1}{2}\) | \(\frac{(\text{ + })}{(\text{ + })+}=+\) | \(f\) is increasing. |
\((1,\infty)\) | \(x=2\) | \(\frac{(\text{ + })}{(-)+}=-\) | \(f\) is decreasing. |
Step 3: Since \(f\) is decreasing over the interval \((-\infty,-1)\) and increasing over the interval \((-1,0),\) \(f\) has a local minimum at \(x=-1.\) Since \(f\) is increasing over the interval \((-1,0)\) and the interval \((0,1),\) \(f\) does not have a local extremum at \(x=0.\) Since \(f\) is increasing over the interval \((0,1)\) and decreasing over the interval \((1,\infty),f\) has a local maximum at \(x=1.\) The analytical results agree with the following graph.
Checkpoint 4.68.
Use the first derivative test to find all local extrema for \(f(x)=\sqrt[3]{x-1}.\)
Subsection 4.5.2 Concavity and Points of Inflection
We now know how to determine where a function is increasing or decreasing. However, there is another issue to consider regarding the shape of the graph of a function. If the graph curves, does it curve upward or curve downward? This notion is called the concavity of the function.
Figure 4.70(a) shows a function \(f\) with a graph that curves upward. As \(x\) increases, the slope of the tangent line increases. Thus, since the derivative increases as \(x\) increases, \(f'\) is an increasing function. We say this function \(f\) is concave up. Figure 4.70(b) shows a function \(f\) that curves downward. As \(x\) increases, the slope of the tangent line decreases. Since the derivative decreases as \(x\) increases, \(f'\) is a decreasing function. We say this function \(f\) is concave down.
Definition 4.69.
Let \(f\) be a function that is differentiable over an open interval \(I.\) If \(f'\) is increasing over \(I,\) we say \(f\) is concave up over \(I.\) If \(f'\) is decreasing over \(I,\) we say \(f\) is concave down over \(I.\)
In general, without having the graph of a function \(f,\) how can we determine its concavity? By definition, a function \(f\) is concave up if \(f'\) is increasing. From Corollary \(3,\) we know that if \(f'\) is a differentiable function, then \(f'\) is increasing if its derivative \(f''(x)\gt 0.\) Therefore, a function \(f\) that is twice differentiable is concave up when \(f''(x)\gt 0.\) Similarly, a function \(f\) is concave down if \(f'\) is decreasing. We know that a differentiable function \(f'\) is decreasing if its derivative \(f''(x)\lt 0.\) Therefore, a twice-differentiable function \(f\) is concave down when \(f''(x)\lt 0.\) Applying this logic is known as the concavity test.
Theorem 4.71. Test for Concavity.
Let \(f\) be a function that is twice differentiable over an interval \(I.\)
If \(f''(x)\gt 0\) for all \(x∈I,\) then \(f\) is concave up over \(I.\)
If \(f''(x)\lt 0\) for all \(x∈I,\) then \(f\) is concave down over \(I.\)
We conclude that we can determine the concavity of a function \(f\) by looking at the second derivative of \(f.\) In addition, we observe that a function \(f\) can switch concavity (Figure 4.73). However, a continuous function can switch concavity only at a point \(x\) if \(f''(x)=0\) or \(f''(x)\) is undefined. Consequently, to determine the intervals where a function \(f\) is concave up and concave down, we look for those values of \(x\) where \(f''(x)=0\) or \(f''(x)\) is undefined. When we have determined these points, we divide the domain of \(f\) into smaller intervals and determine the sign of \(f''\) over each of these smaller intervals. If \(f''\) changes sign as we pass through a point \(x,\) then \(f\) changes concavity. It is important to remember that a function \(f\) may not change concavity at a point \(x\) even if \(f''(x)=0\) or \(f''(x)\) is undefined. If, however, \(f\) does change concavity at a point \(a\) and \(f\) is continuous at \(a,\) we say the point \((a,f(a))\) is an inflection point of \(f.\)
Definition 4.72.
If \(f\) is continuous at \(a\) and \(f\) changes concavity at \(a,\) the point \((a,f(a))\) is an inflection point of \(f.\)
Example 4.74. Testing for Concavity.
For the function \(f(x)=x^3-6x^2+9x+30,\) determine all intervals where \(f\) is concave up and all intervals where \(f\) is concave down. List all inflection points for \(f.\) Use a graphing utility to confirm your results.
To determine concavity, we need to find the second derivative \(f''(x).\) The first derivative is \(f(x)=3x^2-12x+9,\) so the second derivative is \(f''(x)=6x-12.\) If the function changes concavity, it occurs either when \(f''(x)=0\) or \(f''(x)\) is undefined. Since \(f''\) is defined for all real numbers \(x,\) we need only find where \(f''(x)=0.\) Solving the equation \(6x-12=0,\) we see that \(x=2\) is the only place where \(f\) could change concavity. We now test points over the intervals \((-\infty,2)\) and \((2,\infty)\) to determine the concavity of \(f.\) The points \(x=0\) and \(x=3\) are test points for these intervals.
Interval | Test Point | Sign of \(f''(x)=6x-12\) at Test Point | Conclusion |
---|---|---|---|
\((-\infty,2)\) | \(x=0\) | \(-\) | \(f\) is concave down |
\((2,\infty)\) | \(x=3\) | \(+\) | \(f\) is concave up. |
We conclude that \(f\) is concave down over the interval \((-\infty,2)\) and concave up over the interval \((2,\infty).\) Since \(f\) changes concavity at \(x=2,\) the point \((2,f(2))=(2,32)\) is an inflection point. Figure 4.76 confirms the analytical results.
Checkpoint 4.77.
For \(f(x)=-x^3+\frac{3}{2}x^2+18x,\) find all intervals where \(f\) is concave up and all intervals where \(f\) is concave down.
We now summarize, in Table 4.78, the information that the first and second derivatives of a function \(f\) provide about the graph of \(f,\) and illustrate this information in Figure 4.79.
Sign of \(f\) | Sign of \(f''\) | Is \(f\) increasing or decreasing? | Concavity |
---|---|---|---|
Positive | Positive | Increasing | Concave up |
Positive | Negative | Increasing | Concave down |
Negative | Positive | Decreasing | Concave up |
Negative | Negative | Decreasing | Concave down |
Subsection 4.5.3 The Second Derivative Test
The first derivative test provides an analytical tool for finding local extrema, but the second derivative can also be used to locate extreme values. Using the second derivative can sometimes be a simpler method than using the first derivative.
We know that if a continuous function has a local extrema, it must occur at a critical point. However, a function need not have a local extrema at a critical point. Here we examine how the second derivative test can be used to determine whether a function has a local extremum at a critical point. Let \(f\) be a twice-differentiable function such that \(f'(a)=0\) and \(f''\) is continuous over an open interval \(I\) containing \(a.\) Suppose \(f''(a)\lt 0.\) Since \(f''\) is continuous over \(I,\) \(f''(x)\lt 0\) for all \(x∈I\) (Figure 4.80). Then, by Corollary \(3,\) \(f'\) is a decreasing function over \(I.\) Since \(f'(a)=0,\) we conclude that for all \(x∈I,f'(x)\gt 0\) if \(x\lt a\) and \(f'(x)\lt 0\) if \(x\gt a.\) Therefore, by the first derivative test, \(f\) has a local maximum at \(x=a.\) On the other hand, suppose there exists a point \(b\) such that \(f'(b)=0\) but \(f''(b)\gt 0.\) Since \(f''\) is continuous over an open interval \(I\) containing \(b,\) then \(f''(x)\gt 0\) for all \(x∈I\) (Figure 4.80). Then, by Corollary \(3,f'\) is an increasing function over \(I.\) Since \(f'(b)=0,\) we conclude that for all \(x∈I,\) \(f'(x)\lt 0\) if \(x\lt b\) and \(f'(x)\gt 0\) if \(x\gt b.\) Therefore, by the first derivative test, \(f\) has a local minimum at \(x=b.\)
Theorem 4.81. Second Derivative Test.
Suppose \(f'(c)=0,f''\) is continuous over an interval containing \(c.\)
If \(f''(c)\gt 0,\) then \(f\) has a local minimum at \(c.\)
If \(f''(c)\lt 0,\) then \(f\) has a local maximum at \(c.\)
If \(f''(c)=0,\) then the test is inconclusive.
Note that for case iii. when \(f''(c)=0,\) then \(f\) may have a local maximum, local minimum, or neither at \(c.\) For example, the functions \(f(x)=x^3,\) \(f(x)=x^4,\) and \(f(x)=-x^4\) all have critical points at \(x=0.\) In each case, the second derivative is zero at \(x=0.\) However, the function \(f(x)=x^4\) has a local minimum at \(x=0\) whereas the function \(f(x)=-x^4\) has a local maximum at \(x,\) and the function \(f(x)=x^3\) does not have a local extremum at \(x=0.\)
Let’s now look at how to use the second derivative test to determine whether \(f\) has a local maximum or local minimum at a critical point \(c\) where \(f'(c)=0.\)
Example 4.82. Using the Second Derivative Test.
Use the second derivative to find the location of all local extrema for \(f(x)=x^5-5x^3.\)
To apply the second derivative test, we first need to find critical points \(c\) where \(f'(c)=0.\) The derivative is \(f'(x)=5x^4-15x^2.\) Therefore, \(f'(x)=5x^4-15x^2=5x^2(x^2-3)=0\) when \(x=0,\pm\sqrt{3}.\)
To determine whether \(f\) has a local extrema at any of these points, we need to evaluate the sign of \(f''\) at these points. The second derivative is
In the following table, we evaluate the second derivative at each of the critical points and use the second derivative test to determine whether \(f\) has a local maximum or local minimum at any of these points.
\(x\) | \(f''(x)\) | Conclusion |
---|---|---|
\(-\sqrt{3}\) | \(-30\sqrt{3}\) | Local maximum |
\(0\) | \(0\) | Second derivative test is inconclusive |
\(\sqrt{3}\) | \(30\sqrt{3}\) | Local minimum |
By the second derivative test, we conclude that \(f\) has a local maximum at \(x=-\sqrt{3}\) and \(f\) has a local minimum at \(x=\sqrt{3}.\) The second derivative test is inconclusive at \(x=0.\) To determine whether \(f\) has a local extrema at \(x=0,\) we apply the first derivative test. To evaluate the sign of \(f'(x)=5x^2(x^2-3)\) for \(x∈(-\sqrt{3},0)\) and \(x∈(0,\sqrt{3}),\) let \(x=-1\) and \(x=1\) be the two test points. Since \(f'(-1)\lt 0\) and \(f'(1)\lt 0,\) we conclude that \(f\) is decreasing on both intervals and, therefore, \(f\) does not have a local extrema at \(x=0\) as shown in the following graph.
Checkpoint 4.85.
Consider the function \(f(x)=x^3-(\frac{3}{2})x^2-18x.\) The points \(c=3,-2\) satisfy \(f'(c)=0.\) Use the second derivative test to determine whether \(f\) has a local maximum or local minimum at those points.
We have now developed the tools we need to determine where a function is increasing and decreasing, as well as acquired an understanding of the basic shape of the graph. In the next section we discuss what happens to a function as \(x\to\pm\infty.\) At that point, we have enough tools to provide accurate graphs of a large variety of functions.
Subsection 4.5.4 Key Concepts
If \(c\) is a critical point of \(f\) and \(f'(x)\gt 0\) for \(x\lt c\) and \(f'(x)\lt 0\) for \(x\gt c,\) then \(f\) has a local maximum at \(c.\)
If \(c\) is a critical point of \(f\) and \(f'(x)\lt 0\) for \(x\lt c\) and \(f'(x)\gt 0\) for \(x\gt c,\) then \(f\) has a local minimum at \(c.\)
If \(f''(x)\gt 0\) over an interval \(I,\) then \(f\) is concave up over \(I.\)
If \(f''(x)\lt 0\) over an interval \(I,\) then \(f\) is concave down over \(I.\)
If \(f'(c)=0\) and \(f''(c)\gt 0,\) then \(f\) has a local minimum at \(c.\)
If \(f'(c)=0\) and \(f''(c)\lt 0,\) then \(f\) has a local maximum at \(c.\)
If \(f'(c)=0\) and \(f''(c)=0,\) then evaluate \(f'(x)\) at a test point \(x\) to the left of \(c\) and a test point \(x\) to the right of \(c,\) to determine whether \(f\) has a local extremum at \(c.\)