Sketch a function and its derivative
The derivative \(f'(x)\) is the slope of the tangent line to the graph of \(f\) at \(\big(x,f(x)\big)\). These slopes form a function with a graph of its own.
This topic reads the slopes of \(f\) as the heights of \(f'\), and the graph of \(f'\) as the direction and concavity of \(f\). It ends by building a function from conditions on its graph.
Slopes become heights
Two graphs, one above the other. The upper graph is a curve f that rises to a peak, falls to a low point and rises again, with an orange point on it and the orange tangent line there, labeled with its slope. The lower graph is the derivative f′, which is positive, then negative, then positive again, and meets the axis below the peak and below the low point. An orange bar runs from its axis to f′ at the same x, labeled with its height, which equals the slope above. A button sharpens the low point of f into a corner. There the tangent splits into two red half-lines, the bar disappears, and the graph of f′ breaks, with an open ring at each of its two one-sided values.
Figure 1 shows the graph of \(f\) above the graph of \(f'\). The orange line is the tangent at the orange point, and the orange bar below runs from the axis to \(f'(x)\). Move \(x\). The slope printed beside the tangent equals the height printed at the foot of the bar, because both numbers are \(f'(x)\).
To read \(f'(x_0)\) from a graph, find two points \((x_1,y_1)\) and \((x_2,y_2)\) on the tangent at \(x_0\). Its slope, \(f'(x_0)\), is the rise \(y_2-y_1\) divided by the run \(x_2-x_1\). At a point inside a line segment of the graph, the tangent line contains the segment, so \(f'\) there is the slope of the segment.
Where the tangent is horizontal, its slope is 0, so the graph of \(f'\) meets the axis. Where the tangent slopes up, \(f'>0\) and the graph of \(f'\) lies above the axis. Where it slopes down, the graph lies below the axis. A steeper tangent puts the graph of \(f'\) farther from the axis.
By topic 2.4, \(f'\) exists only where the one-sided derivatives are numbers and are equal. At a corner, \(f\) is continuous, but its one-sided derivatives are different numbers. Use the button under Figure 1 to put a corner in the graph of \(f\). Then move the point onto the corner. The tangent splits into two red half-lines with different slopes. On the lower graph, the bar disappears and open rings mark the two one-sided slopes, so \(f'\) has no value at the corner. A jump, a hole or a vertical tangent also rules out a derivative.
Reading a function from its derivative
Two graphs, one above the other. The upper graph is a function f shaped like a W, with an orange point and its tangent. The lower graph is its derivative f′, an S-shaped curve with a peak and a valley, which crosses the axis below each turning point of f. At first, the region between f′ and its axis is green above the axis and red below it, and f is green where it rises and red where it falls. A slider moves the graph of f′ up and down, which tilts f, and a button raises f′ until its valley touches the axis, where f has a horizontal tangent but rises on both sides. Another button colors f′ green where it rises and red where it falls, and dots then mark the inflection points of f, above the peak and the valley of f′.
In the other direction, the graph of \(f'\) describes \(f\). By the Increasing/Decreasing Test (topic 5.3), \(f\) increases on an interval where \(f'>0\) and decreases on an interval where \(f'<0\). In Figure 2, the region between \(f'\) and its axis is green where \(f'>0\) and red where \(f'<0\). The graph of \(f\) has the same colors, green where it rises and red where it falls.
A turning point of \(f\) is an input where \(f\) changes between rising and falling. By the First Derivative Test (topic 5.4), a continuous \(f\) has a local maximum where \(f'\) changes from positive to negative. It has a local minimum where \(f'\) changes from negative to positive. Where \(f'\) is continuous, these are the inputs where its graph crosses the axis.
A zero of \(f'\) without a change of sign is not a turning point. The graph of \(f'\) in Figure 2 has a peak on the left and a valley on the right. Use the button under Figure 2 that raises \(f'\) until its valley touches the axis. Then \(f'\) is positive on both sides of the valley, so \(f\) rises on both sides, with a horizontal tangent but no turn.
By definition (topic 5.6), \(f\) is concave up on an interval where \(f'\) is increasing and concave down where \(f'\) is decreasing. Use the other button to color \(f'\) green where it rises and red where it falls. Where it is green, \(f\) bends upward and lies above its tangent lines. Where it is red, \(f\) bends downward and lies below them.
An inflection point is a point where \(f\) is continuous and its concavity changes, which happens where \(f'\) changes between rising and falling. On the graph of \(f'\), these are its peaks and valleys, and the dots mark them on the graph of \(f\). Move \(f'\) up or down with the slider. Its crossings of the axis move, and with them the intervals where \(f\) rises and falls. Its peak and valley stay at the same inputs. The intervals where \(f\) is concave up or concave down therefore stay the same, and the dots move only up or down.
Matching graphs and building a function
To test whether a graph could be the graph of \(f'\), compare it with the graph of \(f\) at the same inputs. It must be 0 where the tangent of \(f\) is horizontal, positive where the tangent slopes up and negative where it slopes down. It must rise where \(f\) is concave up and fall where \(f\) is concave down. It has no value at a corner of \(f\). One failed test rules a graph out.
The graph of \(f'\) shows where \(f\) rises, falls and bends, but not the height of \(f\). Adding a constant to \(f\) changes no slope, so it does not change the graph of \(f'\).
Each condition on a graph gives an equation: a point \((x_0,y_0)\) gives \(f(x_0)=y_0\), and a tangent of slope \(m\) at \(x_0\) gives \(f'(x_0)=m\). Completing the square writes a quadratic function in vertex form, \(a(x-h)^2+k\) with \(a\neq 0\). By the chain rule, its derivative is \(2a(x-h)\), which is 0 only at \(x=h\), because \(a\neq 0\). The graph therefore has a horizontal tangent at its vertex \((h,k)\) and nowhere else.
If \(a>0\), the derivative is negative for \(x<h\) and positive for \(x>h\), so \(f\) falls and then rises, and the vertex is the lowest point. The derivative is then a rising line, so \(f\) is concave up. If \(a<0\), the vertex is the highest point, and \(f\) is concave down. The vertex gives two equations, \(f(h)=k\) and \(f'(h)=0\), and a condition at another input gives an equation for \(a\).
Example 1
Read derivative values from a function graph
The graph of \(f\) in Figure 3 consists of a line segment for \(0\le x\le 2\) and part of a parabola for \(2\le x\le 7\), and the orange line is tangent to it at \(x=5\). Find \(f'(1)\) and \(f'(5)\). Does \(f'(2)\) exist?
The graph of f on a grid, for x from 0 to 7. A line segment runs from a dot at (0, 6) down to a dot at (2, 4). From there, part of a parabola rises to its highest point near (4.5, 7.1) and falls to (7, 4). An orange line touches the parabola at the orange point (5, 7) and runs from (3, 8) to (7, 6).
Solution
The tangent line at \(x=1\) contains the segment, which runs from \((0,6)\) to \((2,4)\), so
The tangent at \(x=5\) passes through the grid points \((3,8)\) and \((5,7)\), so
At \(x=2\), the secant lines from \((2,4)\) to points on the left lie along the segment and have slope \(-1\). To the right of 2, the graph is higher than 4, so the secant lines from \((2,4)\) to points there have positive slopes. The slopes from the two sides do not approach one number, so \(f'(2)\) does not exist. The graph has a corner there.
Example 2
Read function direction from a derivative graph
Figure 4 shows the graph of \(f'\), the derivative of a function \(f\), for \(-3\le x\le 4\). The graph consists of four line segments. On which intervals is \(f\) increasing? At which values of \(x\) in \(-3<x<4\) does \(f\) have a local minimum or a local maximum?
The graph of f′ on a grid, for x from −3 to 4, made of four line segments through (−3, −1), (−1, 1), (1, 0), (2, 1) and (4, −1). It crosses the axis upward at x = −2, touches the axis at x = 1 and rises again, and crosses the axis downward at x = 3.
Solution
The graph of \(f'\) meets the axis at \(x=-2\), \(x=1\) and \(x=3\). It lies above the axis on \((-2,1)\) and \((1,3)\), and below it on \((-3,-2)\) and \((3,4)\). Because \(f\) is differentiable, it is continuous. By the Increasing/Decreasing Test, \(f\) increases on \([-2,1]\) and on \([1,3]\), so it increases on all of \([-2,3]\).
By the First Derivative Test, \(f\) has a local minimum at \(x=-2\), where \(f'\) changes from negative to positive. It has a local maximum at \(x=3\), where \(f'\) changes from positive to negative. At \(x=1\), \(f'\) is 0 but positive on both sides, so \(f\) has neither.
Example 3
Read concavity from a derivative graph
Figure 5 shows the graph of \(f'\), the derivative of a function \(f\), for \(-1\le x\le 7\). On which intervals is the graph of \(f\) concave up, and on which is it concave down? At which value of \(x\) does \(f\) have an inflection point?
The graph of f′ on a grid, for x from −1 to 7: a parabola that opens downward, with its highest point (3, 9) labeled. It starts at −7 at x = −1, crosses the axis upward at x = 0 and downward at x = 6, and ends at −7 at x = 7.
Solution
By the definition of concavity, \(f\) is concave up where \(f'\) increases and concave down where \(f'\) decreases, whatever the sign of \(f'\). The graph of \(f'\) rises from \(x=-1\) to its highest point at \(x=3\) and falls from there to \(x=7\), so
At \(x=3\), \(f'\) changes from increasing to decreasing, so the concavity changes. Because \(f'(3)=9\) exists, \(f\) is continuous at 3 and has a tangent line there, so \(f\) has an inflection point at \(x=3\).
Example 4
Match a function with its derivative
Figure 6 shows the graph of a function \(f\) for \(-2.5\le x\le 2.5\) and three graphs labeled A, B and C. Which of A, B and C is the graph of \(f'\)?
The graph of a function f for x from −2.5 to 2.5, shaped like a W, with low points at x = −2 and x = 2 and a high point at x = 0, and an orange point with its tangent. Below it, three small graphs. A is an S-shaped curve that is above the axis between 0 and 2. B is A turned upside down, below the axis between 0 and 2. C has the W shape of f and is above the axis at x = 0. Dashed lines mark x = −2, 0 and 2 on all four graphs, and an orange bar on each small graph stands at the same x as the point on f.
Solution
The graph of \(f\) has horizontal tangents at \(x=-2\), \(x=0\) and \(x=2\), so the graph of \(f'\) meets the axis at these inputs. C is above the axis at \(x=0\), so C is not the graph of \(f'\).
On \((0,2)\), the tangent of \(f\) slopes down, so \(f'<0\) there. A lies above the axis on \((0,2)\), so A is not the graph of \(f'\) either.
B meets the axis at the three inputs. It lies below the axis where the tangent of \(f\) slopes down and above it where the tangent slopes up. Only B passes both tests, so B is the graph of \(f'\).
Example 5
Build a function from graph conditions
Find the quadratic function \(f\) whose graph has its vertex at \((1,-2)\) and whose tangent line at \(x=5\) has slope 12. Is the vertex the highest or the lowest point of the graph?
Solution
A quadratic function with vertex \((1,-2)\) has the vertex form below, with one unknown \(a\neq 0\). Its derivative follows by the chain rule:
For every \(a\), this form satisfies the two equations of the vertex, \(f(1)=-2\) and \(f'(1)=0\), so the slope condition is the one equation for \(a\):
The function is \(f(x)=\tfrac32(x-1)^2-2\). Because \(a>0\), its derivative \(3(x-1)\) is negative for \(x<1\) and positive for \(x>1\), so \(f\) falls and then rises. The vertex is the lowest point of the graph.
Each example is one of the five skills of topic 5.8 in Which & Why: AP Calculus.