Connect f, f′ and f″
The derivative \(f'\) gives the slope of the graph of a function \(f\) at each \(x\). The second derivative \(f''\) gives the slope of the graph of \(f'\) (topic 3.6). This topic reads the three graphs together: how to tell them apart, what their signs and zeros say about \(f\), and what they leave open.
Two questions about the shape of a graph
Three graphs, one above another, on the same x-scale with no numbers. The top graph is a function f that rises to a local maximum, falls through an inflection point to a local minimum and rises again. It is green where it rises and red where it falls. The middle graph is f′, a curve shaped like a cup that lies below its axis between the two turning points of f and above it outside them. It is red where it falls and green where it rises. The bottom graph is f″, a rising line that crosses its axis below the inflection point, with the region between the line and its axis red below the axis and green above it. Chalk dots mark the local maximum, the local minimum and the inflection point of f. An orange point on f carries its tangent line, and at the same x an orange bar and an orange tangent line mark f′ and an orange bar marks f″. A button raises the middle graph until its lowest point touches its axis: the top graph then tilts and rises everywhere, with a horizontal tangent at its inflection point, and the bottom graph does not move.
In Figure 1, the orange bar on the middle graph reaches \(f'(x)\), the slope of the tangent line at the orange point on \(f\). In the same way, the bar on the bottom graph reaches \(f''(x)\), the slope of the orange tangent line on the middle graph.
The first question is whether \(f\) rises or falls. If \(f'(x)>0\) for every \(x\) in an interval, then \(f\) is increasing there, and if \(f'(x)<0\), it is decreasing. This is the Increasing/Decreasing Test of topic 5.3. In Figure 1, the top graph is green where the middle graph is above its axis, and red where it is below.
The second question is which way \(f\) bends. Its graph is concave up, or bends up, on an interval where \(f'\) is increasing, and concave down where \(f'\) is decreasing (topic 5.6). The same test, applied to \(f'\), shows that \(f'\) increases where \(f''>0\), so \(f\) is concave up there, and concave down where \(f''<0\). This is the Concavity Test of topic 5.6. In Figure 1, the middle graph is green where it rises, which is where \(f''>0\).
The graph of \(f'\) therefore answers both questions: its sign gives the direction of \(f\), and its own direction gives the bend. The two answers are independent. From left to right, the top graph rises and bends down, falls and bends down, falls and bends up, and rises and bends up.
Use the button under Figure 1 to raise the graph of \(f'\) until it touches its axis. Every slope of \(f\) grows by the same amount, so the top graph tilts and now rises everywhere. The middle graph keeps its shape, so the bottom graph stays as it was. The sign of \(f'\) changed, but not its direction, so \(f\) bends as before. Lower \(f'\) again with the same button.
To tell unnamed graphs apart, compare the signs of one with the directions of another. Where a graph rises, its secant lines slope up, so its derivative, the limit of their slopes, is positive or 0. Where it falls, its derivative is negative or 0. Matching zeros with horizontal tangents is not enough, because \(-f'\) has the same zeros as \(f'\).
Zeros are only candidates
A zero of \(f\), where its graph meets the \(x\)-axis, depends on the height of \(f\), not on its shape. By Fermat's Theorem (topic 5.2), \(f'\) is 0 or does not exist at a local maximum or minimum. A zero of \(f'\) is a stationary point, where the tangent line is horizontal. It is only a candidate for a local extremum, an input where one may occur. By the First Derivative Test of topic 5.4, \(f\) has a local maximum at a stationary point \(c\) if \(f'\) changes from positive to negative there. If it changes from negative to positive, \(f\) has a local minimum. In Figure 1, \(f'\) crosses its axis below both extrema of \(f\).
An inflection point is a point where \(f\) is continuous and its concavity changes (topic 5.6). If \(f\) has one at \(c\) and \(f''(c)\) exists, then \(f'\) is continuous at \(c\) (topic 2.4). Because \(f'\) changes there from increasing to decreasing or back, it has a local extremum at \(c\), so \(f''(c)=0\) by Fermat's Theorem. The candidates for inflection points are therefore the zeros of \(f''\) and the inputs where \(f''\) does not exist. A candidate is an inflection point if \(f\) is continuous there and \(f''\) changes sign. The second derivative of \(x^4\), \(12x^2\), is 0 at 0 but positive on both sides, so the graph of \(x^4\) has no inflection point there. In Figure 1, \(f''\) changes sign below the lowest point of the graph of \(f'\).
Raise \(f'\) again. The middle graph touches its axis below the inflection point and is positive on both sides. Move the point there with the second button. The tangent line is horizontal, yet \(f\) rises on both sides, so this stationary point is not a local extremum. It is an inflection point, because \(f''\) still changes sign there.
What the derivatives leave open
At the top, the graph of f′, a wave that rises to a peak, falls below its axis and comes back above it. Below, faint copies of one curve at five heights, and a teal copy that a slider moves up and down. Every copy rises, turns and bends at the same inputs. Short orange stems mark the height of f′ at four inputs, and short orange segments on the teal copy have these heights as slopes. A button marks one point, a red line joins it to the teal copy, and the teal copy moves until it passes through the point.
The top graph in Figure 2 is the graph of a derivative \(f'\). The curves below it are copies of one curve with this derivative, moved up or down, so each has the slope \(f'(x)\) at \(x\). Move the teal curve with the slider. Its stationary points and inflection points stay at the same \(x\), but its values and its zeros change.
No other curves have this derivative. Suppose that \(f\) and \(g\) are differentiable on an interval, with \(g'=f'\) there, and let \(h=g-f\), so that \(h'=0\). For any \(x_1<x_2\) in the interval, \(h\) is differentiable, and therefore continuous, on \([x_1,x_2]\). The Mean Value Theorem (topic 5.1) gives a \(t\) between them with
The function \(h\) therefore has one value \(C\) on the whole interval, and \(g=f+C\). Two functions with the same derivative on an interval differ by a constant there, a corollary of the Mean Value Theorem. Across a gap in the domain, the theorem does not apply, and each piece of \(f\) can move by its own constant.
The graphs of \(f'\) and \(f''\) fix the shape of \(f\) but not its height. They support conclusions about where \(f\) rises, falls and bends, and about changes \(f(x_2)-f(x_1)\), in which \(C\) cancels. They do not determine any value of \(f\), its sign or its zeros. One known value of \(f\) does: press the button under Figure 2, and only one copy passes through the given point.
Other facts about \(f\) give equations in the same way. A point on the graph gives a value \(f(c)\). Where the derivatives exist, a local extremum at \(c\) gives \(f'(c)=0\) and an inflection point gives \(f''(c)=0\). A formula with unknown numbers needs as many such equations as unknowns. The last two equations are necessary but not sufficient, so test the formula against every fact.
Example 1
Identify which function a graph represents
The graphs \(P\), \(Q\) and \(R\) in Figure 3 are the graphs of \(f\), \(f'\) and \(f''\) for one function \(f\), in some order. Which graph is which?
Three graphs, named P, Q and R from top to bottom, on one x-axis from 0 to 2π with the same vertical scale, each green where it rises and red where it falls. P starts at its highest value, falls to its lowest value at π and rises back to its highest value at 2π. Q starts at 0, falls to its lowest value at π/2, rises to its highest value at 3π/2 and falls back to 0 at 2π. R starts at 0, rises to its highest value at π/2, falls to its lowest value at 3π/2 and rises back to 0 at 2π. A button moves R to the top, P to the middle and Q to the bottom, and names them f, f′ and f″.
Solution
On \(0<x<\frac{\pi}{2}\), graph \(R\) rises while \(P\) and \(Q\) fall, and \(Q\) is the only graph below the axis. A falling graph has a derivative that is negative or 0. The derivative of \(P\) or of \(Q\), if it is one of the three graphs, is therefore \(Q\).
The derivative of \(f\) is \(f'\), and the derivative of \(f'\) is \(f''\), each a different graph. Since \(Q\) could only be its own derivative, \(Q\) is neither \(f\) nor \(f'\), so \(Q=f''\). Then \(P\) is \(f\) or \(f'\), and its derivative is \(Q\), so \(P=f'\) and \(R=f\).
Example 2
Connect signs with direction and concavity
Let \(f(x)=\ln\left(1+x^2\right)\). On which open intervals is \(f\) increasing, and on which is the graph of \(f\) concave down?
Solution
Because \(1+x^2>0\) for every \(x\), \(f\) is twice differentiable on the whole line. The chain rule and then the quotient rule give
Both denominators are positive, so \(f'\) has the sign of \(x\), and \(f''\) has the sign of \(1-x^2\). The function \(f\) is therefore increasing on \((0,\infty)\), and its graph is concave down on \((-\infty,-1)\) and on \((1,\infty)\), where \(1-x^2\) is negative.
Example 3
Connect zeros with candidate features
Figure 4 shows the graph of the derivative \(f'\) of a function \(f\). Where on \(-3<x<6\) does \(f\) have a local maximum, a local minimum or an inflection point? Justify each answer.
The graph of f′ for x from −3 to 6, with grid lines at whole numbers on both axes. It rises from about −3 at x = −3 and crosses the x-axis at x = −2. It rises to a peak of 2 at x = 0, then falls and touches the x-axis at x = 4 without crossing it, and rises to 2 again at x = 6.
Solution
Because \(f'\) exists on the whole interval, \(f\) is continuous, and its candidates for local extrema are the zeros of \(f'\), \(-2\) and 4. At \(x=-2\), \(f'\) changes from negative to positive, so \(f\) has a local minimum. At \(x=4\), \(f'\) is 0 but positive on both sides, so \(f\) has no extremum there.
The graph of \(f'\) rises until \(x=0\), falls until \(x=4\) and rises again, so the concavity of \(f\) changes at 0 and at 4.
The function \(f\) has a local minimum at \(x=-2\), inflection points at \(x=0\) and \(x=4\), and no local maximum.
Example 4
Choose conclusions supported by the available information
A function \(f\) has \(f'(x)=x^2-4x\) for every \(x\), and \(g(x)=\tfrac13x^3-2x^2\) has the same derivative. Which of these statements must be true? (i) \(f\) has a local minimum at \(x=4\). (ii) \(f(4)-f(1)=-9\). (iii) \(f(4)<0\).
Solution
Because \(f\) and \(g\) have the same derivative on the whole line, \(f(x)=g(x)+C\) for some constant \(C\).
(i) Here \(f'(x)=x(x-4)\) changes from negative to positive at 4, so \(f\) has a local minimum there, and (i) must be true.
(ii) In a difference of two values of \(f\), the constant cancels, so (ii) must be true:
(iii) The value \(f(4)=g(4)+C=-\tfrac{32}{3}+C\) is negative for \(C\) below \(\tfrac{32}{3}\) and positive for \(C\) above it. No given fact fixes \(C\), so (iii) need not be true.
Example 5
Combine several pieces of derivative evidence
Find \(a\), \(b\) and \(k\) so that \(f(x)=x^3+ax^2+bx+k\) has a local maximum at \(x=-1\) and an inflection point at \((1,-4)\).
Solution
Here \(f'(x)=3x^2+2ax+b\) and \(f''(x)=6x+2a\). An inflection point at 1 needs \(f''(1)=0\), a local maximum at \(-1\) needs \(f'(-1)=0\), and the point gives \(f(1)=-4\):
The first equation gives \(a=-3\), the second then gives \(b=-9\), and the third gives \(k=7\), so \(f(x)=x^3-3x^2-9x+7\).
The first two equations are necessary but not sufficient, so test the result. Here \(f''(x)=6x-6\) changes sign at 1, so \((1,-4)\) is an inflection point. Since \(f'(-1)=0\) and \(f''(-1)=-12<0\), the Second Derivative Test (topic 5.7) gives a local maximum at \(-1\).
Each example is one of the five skills of topic 5.9 in Which & Why: AP Calculus.