Curve sketching and connecting f, f' and f''
Intercepts and asymptotes give the outline of a graph, but where exactly does it turn, and where does its bend change? And when all we have is the graph of a derivative, what does the function itself look like?
Where you are 11 in Applications of derivatives
When you reach for it
Algebra already sketches graphs from zeros, asymptotes and end behavior (Graphing polynomial functions, Graphing rational functions); those sketches know where a graph meets the axis but can only guess where it turns and how it bends. Derivatives settle both: f' places every peak and valley exactly, and f'' places every change of bend. Reach for this lesson when you want the true shape of a graph from its formula, or when all you have is the graph of f' or of f'', or only a list of signs, and you want f.
The procedure
Day 1: from a formula to a sketch
Every piece of the sketch is something already proved; the work is putting them in one picture. The domain comes first, because every later chart is split at its gaps. The intercepts come from f(0) and the zeros of f, when they can be found. Symmetry halves the work: if f(-x) = f(x) the graph is symmetric across the y-axis, and if f(-x) = -f(x) it is symmetric through the origin. Asymptotes come from limits: a vertical asymptote at a point a where a one-sided limit is infinite (Infinite limits and vertical asymptotes), and a horizontal asymptote y = L when \lim_{x \to \infty} f(x) = L or \lim_{x \to -\infty} f(x) = L (Limits at infinity and horizontal asymptotes).
Then the two sign charts. The zeros of f', the points where it does not exist, and the domain gaps split the line into pieces on which f' keeps one sign (Increasing and decreasing from the derivative); f is increasing where f' > 0 and decreasing where f' < 0, and the The first and second derivative tests reads each critical point as a peak, a valley or neither, which gives the local Maxima, minima and critical points. The same splitting for f'' gives concave up where f'' > 0, concave down where f'' < 0, and a point of inflection wherever the concavity changes at a point of the graph (Concavity and inflection points). Every point found is plotted at its exact height.
The two charts combine into four kinds of arc, one for each pair of signs:
| f'' > 0 | f'' < 0 | |
|---|---|---|
| f' > 0 | rising, more and more steeply | rising, less and less steeply |
| f' < 0 | falling, less and less steeply | falling, more and more steeply |
Between consecutive marked points the graph is one of these arcs, so the sketch is a chain of arcs ending in the behavior the limits give.
Day 2: from a derivative’s graph back to the function
The same facts read the other way. On a graph of f', the sign (above or below the axis) says where f rises or falls: a crossing of the axis is a peak or valley of f, a touch without crossing is not. The direction of the graph of f' (rising or falling) is the sign of f'' and says how f bends, so the peaks and valleys of the graph of f' are the inflection points of f. On a graph of f'' only the second fact is available: its sign gives the concavity of f and its crossings the inflection points, while the rises and falls of f need something more about f', such as one of its values.
None of these graphs fixes the heights of f: two functions with the same derivative on an interval differ by a constant (The mean value theorem), so one value of f is needed to place it. This runs The derivative as a function backward, turning heights of f' into slopes of f.
Worked examples
Day 1: Potira’s quartic
Potira wants an accurate sketch of f(x) = x^4 - 8x^3 + 18x^2.
SolutionA polynomial has every real number as its domain and no asymptotes, and the x^4 term sends f(x) \to \infty as x \to \pm\infty. Factoring, f(x) = x^2(x^2 - 8x + 18), and the quadratic has discriminant 64 - 72 < 0, so it is always positive: (0, 0) is the only intercept and f(x) > 0 for x \ne 0. There is no symmetry, since f(-1) = 27 while f(1) = 11.
The derivatives are
The factor 4x changes sign at 0 and (x - 3)^2 is never negative; 12(x - 1)(x - 3) is negative only between its zeros. So the charts, split at 0, 1 and 3, are:
| Piece | f' | f'' |
|---|---|---|
| (-\infty, 0) | - | + |
| (0, 1) | + | + |
| (1, 3) | + | - |
| (3, \infty) | + | + |
f falls to a local minimum f(0) = 0 and rises from then on. At 3 the sign of f' does not change, so the point there, with f(3) = 81 - 216 + 162 = 27, is not an extremum: it is a level tangent in a rising graph. The concavity changes at 1 and 3, giving inflection points (1, 11), since f(1) = 1 - 8 + 18 = 11, and (3, 27).
From left to right (Figure 1): falling, concave up, into the valley; rising more and more steeply to (1, 11); rising less and less steeply to the flat point (3, 27); then rising more and more steeply. The zeros alone show only a touch at 0; the step at (3, 27) appears only through f' and f''.
Day 1: Kauan’s rational function
Kauan sketches g(x) = \dfrac{x}{(x - 2)^2}.
SolutionThe domain is x \ne 2, the only intercept is (0, 0), and there is no symmetry (g(1) = 1 but \displaystyle g(-1) = -\frac{1}{9}).
As x \to 2 from either side the numerator tends to 2 and the denominator to 0 through positive values, so \lim_{x \to 2^-} g(x) = \lim_{x \to 2^+} g(x) = \infty: x = 2 is a vertical asymptote. The denominator has the higher degree, so \lim_{x \to \pm\infty} g(x) = 0 and y = 0 is a horizontal asymptote, approached from below on the left, where g < 0, and from above on the right.
Writing g(x) = x(x - 2)^{-2}, the product rule gives
and differentiating -(x + 2)(x - 2)^{-3} the same way,
g' breaks at -2 and at the gap 2; g'' breaks at -4 and 2, and its denominator is positive everywhere else, so g'' has the sign of x + 4.
| Piece | g' | g'' |
|---|---|---|
| (-\infty, -4) | - | - |
| (-4, -2) | - | + |
| (-2, 2) | + | + |
| (2, \infty) | - | + |
So g falls to a local minimum \displaystyle g(-2) = \frac{-2}{16} = -\frac{1}{8}, climbs through the origin (with slope \displaystyle g'(0) = \frac{1}{4}) up the asymptote, and on the far side falls from \infty toward 0. It is concave down only on (-\infty, -4), so there is one inflection point, \displaystyle \left(-4, -\frac{1}{9}\right), since \displaystyle g(-4) = \frac{-4}{36}. The sign of g' also changes at 2, but 2 is not in the domain: no extremum there.
The dip is shallow (Figure 2). Zeros and asymptotes say only that the graph is negative left of 0; the derivatives find where it turns and bends.
Day 1: Araci’s logarithm
Araci sketches h(x) = x(\ln x)^2.
SolutionThe domain is (0, \infty), so symmetry cannot occur. Since h(x) \ge 0, with h(x) = 0 only when \ln x = 0, the only intercept is (1, 0). At the open end, \lim_{x \to 0^+} x(\ln x)^2 = 0, because a positive power of x beats any power of \ln x (Comparing growth rates at infinity): the graph starts at the origin, which is not on it, and there is no vertical asymptote. As x \to \infty both factors grow, so there is no horizontal asymptote either.
By the product and chain rules,
h'(x) = 0 when \ln x = 0 or \ln x = -2, at x = 1 and x = e^{-2}. Both factors of h' are negative for x < e^{-2}, they have opposite signs between e^{-2} and 1, and both are positive beyond 1. h'' has the sign of \ln x + 1, which changes at x = e^{-1}.
| Piece | h' | h'' |
|---|---|---|
| (0, e^{-2}) | + | - |
| (e^{-2}, e^{-1}) | - | - |
| (e^{-1}, 1) | - | + |
| (1, \infty) | + | + |
So h rises to a local maximum h(e^{-2}) = e^{-2}(-2)^2 = 4e^{-2} \approx 0.541, falls to a local minimum h(1) = 0, and rises without bound. The concavity changes at e^{-1}, giving the inflection point (e^{-1}, e^{-1}), about (0.368, 0.368). One more limit shapes the start: h'(x) \to \infty as x \to 0^+, because (\ln x)^2 outgrows 2\ln x, so the graph leaves the origin almost vertically (Figure 3).
Day 2: reading f from the graph of f’
The top of Figure 4 is the graph of f' on [-2.4, 1.9]. It crosses the x-axis at -2, touches it at 1 without crossing, and has a high point at (-1, 4) and a low point at (1, 0). Where does f rise and fall, and where are its extrema and inflection points? Sketch f given f(-2) = 0.
SolutionAbove or below the axis first. f' < 0 on (-2.4, -2), and f' > 0 on (-2, 1.9) except at the single point 1. So f is decreasing on [-2.4, -2] and increasing on [-2, 1.9]; one isolated zero of f' does not stop f from increasing. By the first derivative test, f has a local minimum at -2 and no extremum at 1, where f' touches the axis but keeps its sign.
Then rising or falling. The graph of f' rises on (-2.4, -1), falls on (-1, 1) and rises on (1, 1.9), so f'' > 0, then f'' < 0, then f'' > 0: f is concave up, down, up. The concavity changes at -1 and 1, the high and low points of the graph of f', and these are the inflection points of f. At 1 also f'(1) = 0, so that inflection point has a level tangent, like (3, 27) in Example 1.
The graph of f' gives no heights. With f(-2) = 0 the lowest point is (-2, 0), and the bottom of Figure 4 shows the resulting f, which is \displaystyle f(x) = \frac{1}{4}x^4 - \frac{3}{2}x^2 + 2x + 6 (its derivative is x^3 - 3x + 2 = (x - 1)^2(x + 2)). Any other function with this derivative is this one shifted up or down.
Day 2: reading f from the graph of f’’
Figure 5 is the graph of f'' on [-1.5, 3]; it touches the axis at 0 and crosses it at 2. Also f'(0) = 0 and \displaystyle f'(3) = \frac{9}{8}. Find the concavity and inflection points of f, and classify its critical points.
SolutionThe sign of f'' gives the concavity directly. f'' < 0 on (-1.5, 0) and on (0, 2), and f'' > 0 on (2, 3). A single point where f'' = 0 does not stop f' from decreasing, so f is concave down on (-1.5, 2) and concave up on (2, 3), and the only inflection point is at x = 2. At 0 the graph of f'' touches the axis without crossing, so the concavity does not change there.
The rises and falls of f need f', and the graph of f'' gives only its direction: f' is decreasing on [-1.5, 2] and increasing on [2, 3]. Since f'(0) = 0 and f' is decreasing up to 2, f' > 0 on [-1.5, 0) and f' < 0 on (0, 2]. So f has a local maximum at 0. The second derivative test could not say this, because f''(0) = 0; the first derivative test does.
On [2, 3], f' increases from the negative value f'(2) to \displaystyle f'(3) = \frac{9}{8} > 0. It is continuous, being differentiable, so by the intermediate value theorem it is zero somewhere in (2, 3), and because it is increasing it is zero only once, at some c. There f' changes from negative to positive: a local minimum. The graph cannot place c exactly; for the curve drawn, \displaystyle f''(x) = \frac{1}{2}x^2(x - 2) with \displaystyle f'(x) = \frac{1}{24}x^3(3x - 8), it is \displaystyle c = \frac{8}{3}.
Day 2: matching f, f’ and f’’
Figure 6 shows a function f, its derivative f' and its second derivative f'', in some order, labeled A, B and C. Which is which?
SolutionC is positive everywhere. If C were the derivative of A or of B, that function would be increasing everywhere, with no turning point; but A and B both turn. So C is the derivative of neither, and C is f.
Then f' is A or B, and it must be zero where C turns (at 0), positive where C rises (x < 0) and negative where C falls (x > 0). A does all three. B is negative at 0, so it is not f'. Hence A is f' and B is f''. The last pair should agree, and it does: A turns at about \pm 0.58, where B crosses the axis; A falls between those points, where B is negative, and rises outside them, where B is positive. The graphs were drawn from f(x) = \dfrac{1}{1 + x^2}.
Day 2: a sketch from signs alone
No formula is given, only this: f is continuous everywhere, f(-1) = 3, f(0) = 1, f(1) = -1, \lim_{x \to -\infty} f(x) = -\infty, \lim_{x \to \infty} f(x) = 2, and
| Piece | f' | f'' |
|---|---|---|
| (-\infty, -1) | + | - |
| (-1, 0) | - | - |
| (0, 1) | - | + |
| (1, \infty) | + | - |
with f'(-1) = 0, f''(0) = 0, and neither f'(1) nor f''(1) existing. Sketch f and name its extrema and inflection points.
SolutionPlot the three points and the asymptote, then join them with the arcs the table names. Coming up from -\infty, f rises less and less steeply to (-1, 3), where f' changes from + to -: a local maximum with a level tangent. It falls more and more steeply, still concave down, to (0, 1), where the concavity changes: an inflection point. On (0, 1) it falls less and less steeply to (1, -1). There f' changes from - to + and f is continuous, so the first derivative test gives a local minimum although f'(1) does not exist: the graph has a corner. Beyond 1 it rises less and less steeply toward y = 2, from below, since it is increasing.
The concavity also changes at 1, from up to down, and f is continuous there, so (1, -1) is an inflection point as well as a minimum; the definition asks nothing of f' or f'' at the point. Figure 7 shows one function that fits, x^3 - 3x + 1 for x \le 1 and 2 - 3e^{-(x - 1)} for x > 1. Any sketch with the same points, arcs and asymptote is equally correct.
Boundaries
- The charts need every break point. A sign chart is valid only when it is split at every zero of the derivative, every point where the derivative does not exist and every gap in the domain. A missed break point can hide a turn or a bend.
- Nothing happens at a gap in the domain. A sign change of f' or f'' across a vertical asymptote (Example 2, Exercise 7) gives no extremum and no inflection point, because there is no point of the graph there.
- An inflection point needs a change of concavity, not f'' = 0. Example 5 has f''(0) = 0 and no inflection point; Example 7 has an inflection point where f'' does not exist.
- A derivative’s graph gives shape, not height. A graph of f' fixes f only up to an added constant on an interval, and a graph of f'' fixes f only up to an added linear function ax + b. Rises and falls cannot be read from f'' alone.
- A chart on a window says nothing outside it. Example 4 describes f only on [-2.4, 1.9]; behavior far out needs limits.
Where this goes next
Reading a function from the graph of its rate returns in Graphing an accumulation function, where the function is an amount built up from a rate and areas under the rate graph supply the heights. Optimization runs the sign chart of f' on a quantity to be made as large or small as possible.
Exercises
Day 1: sketching from a formula
For Exercises 1 to 6, give the domain, intercepts, symmetry and asymptotes; the intervals where f is increasing and decreasing, and its local extrema; the intervals of concavity and the inflection points. Then sketch the graph.
- f(x) = x(x - 4)^3
- f(x) = \dfrac{12}{x^2 + 3}
- f(x) = \dfrac{x^2}{x^2 - 9}
- f(x) = x^2 \ln x
- f(x) = \ln(x^2 + 1)
- f(x) = (x + 1)e^{-x}
Day 1: reasoning
- Kauan notices that the second derivative in Exercise 3 changes sign at x = 3 and at x = -3, and says the graph has inflection points there. Is he right?
- Prove that the graph of every cubic f(x) = ax^3 + bx^2 + cx + d with a \ne 0 has exactly one inflection point, at x = -\dfrac{b}{3a}, and that when f has two critical points the inflection point lies halfway between them.
- Suppose f'(x) > 0 and f''(x) > 0 for every x > 0. Show that \lim_{x \to \infty} f(x) = \infty, so the graph has no horizontal asymptote on the right.
Day 2: reading graphs of derivatives
Figure 8 is the graph of f' for a function f that is differentiable on [-3, 4]. It is made of line segments joining (-3, -2), (-1, 2), (2, -1) and (4, 1).
- On which intervals is f increasing, and on which decreasing? At which x does f have a local maximum or a local minimum?
- On which intervals is f concave up, and on which concave down? Find the x-coordinates of the inflection points and the value of f'' on each segment. Where does f'' not exist?
- Potira says f has an inflection point at x = 1, because the graph of f' passes through (1, 0). What is wrong?
- A function has f''(x) = (x + 2)^2(x - 1)e^x. Find the intervals of concavity and the x-coordinates of the inflection points.
- A function has f'(x) = \dfrac{(x - 2)(x + 1)^2}{x^2 + 1}. Find its local extrema, and show that f has an inflection point at x = -1.
- Figure 9 shows a function, its derivative and its second derivative on [0, 2\pi], labeled A, B and C in some order. Which is which?
Day 2: reasoning
- Sketch a function with all of these properties, and check that f(x) = \dfrac{4}{(x - 2)^2} has them: f is defined for every x \ne 2, f(0) = 1, \lim_{x \to 2} f(x) = \infty, \lim_{x \to \pm\infty} f(x) = 0, f' > 0 on (-\infty, 2), f' < 0 on (2, \infty), and f'' > 0 on both.
- Araci wants a function with f'(x) > 0 and f''(x) < 0 for every x, and \lim_{x \to -\infty} f(x) = 0. Show that none exists.
- Kauan says: “If the graph of f'' has a local maximum at c, then f has an inflection point at c.” Give a counterexample, and say which graph’s peaks and valleys do give inflection points.
Answers
- All reals; intercepts (0, 0) and (4, 0); no symmetry, no asymptotes, f \to \infty at both ends. f'(x) = 4(x - 1)(x - 4)^2: decreasing on (-\infty, 1], increasing on [1, \infty); local minimum f(1) = -27, and a level tangent but no extremum at 4. f''(x) = 12(x - 2)(x - 4): concave up on (-\infty, 2) and (4, \infty), down on (2, 4); inflection points (2, -16) and (4, 0).
- All reals; intercept (0, 4); even; horizontal asymptote y = 0. f'(x) = -\dfrac{24x}{(x^2 + 3)^2}: increasing on (-\infty, 0], decreasing on [0, \infty); local maximum f(0) = 4. f''(x) = \dfrac{72(x^2 - 1)}{(x^2 + 3)^3}: concave up on (-\infty, -1) and (1, \infty), down on (-1, 1); inflection points (\pm 1, 3).
- x \ne \pm 3; intercept (0, 0); even. Vertical asymptotes x = \pm 3, with \lim_{x \to 3^-} f(x) = -\infty and \lim_{x \to 3^+} f(x) = \infty, mirrored at -3; horizontal asymptote y = 1, approached from above since f(x) - 1 = \dfrac{9}{x^2 - 9}. f'(x) = -\dfrac{18x}{(x^2 - 9)^2}: increasing on (-\infty, -3) and (-3, 0], decreasing on [0, 3) and (3, \infty); local maximum f(0) = 0. f''(x) = \dfrac{54(x^2 + 3)}{(x^2 - 9)^3}: concave up for \lvert x \rvert > 3, down on (-3, 3); no inflection point.
- (0, \infty); intercept (1, 0); no symmetry; \lim_{x \to 0^+} f(x) = 0 and f \to \infty, so no asymptotes. f'(x) = x(2\ln x + 1): decreasing on (0, e^{-1/2}], increasing on [e^{-1/2}, \infty); local minimum f(e^{-1/2}) = -\dfrac{1}{2e} \approx -0.184. f''(x) = 2\ln x + 3: concave down on (0, e^{-3/2}), up on (e^{-3/2}, \infty); inflection point \left(e^{-3/2}, -\dfrac{3}{2e^3}\right) \approx (0.223, -0.075).
- All reals; intercept (0, 0); even; no asymptotes, f \to \infty at both ends. f'(x) = \dfrac{2x}{x^2 + 1}: decreasing on (-\infty, 0], increasing on [0, \infty); local minimum f(0) = 0. f''(x) = \dfrac{2(1 - x^2)}{(x^2 + 1)^2}: concave up on (-1, 1), down for \lvert x \rvert > 1; inflection points (\pm 1, \ln 2).
- All reals; intercepts (-1, 0) and (0, 1); no symmetry; horizontal asymptote y = 0 as x \to \infty, approached from above, and f \to -\infty as x \to -\infty. f'(x) = -xe^{-x}: increasing on (-\infty, 0], decreasing on [0, \infty); local maximum f(0) = 1. f''(x) = (x - 1)e^{-x}: concave down on (-\infty, 1), up on (1, \infty); inflection point \left(1, \dfrac{2}{e}\right) \approx (1, 0.736).
- No. 3 and -3 are not in the domain, so there is no point of the graph there, and a point of inflection must be a point of the graph at which f is continuous.
- f''(x) = 6ax + 2b is linear with slope 6a \ne 0, so it is zero only at -\dfrac{b}{3a} and changes sign there: exactly one inflection point. The critical points are the roots of 3ax^2 + 2bx + c = 0, whose sum is -\dfrac{2b}{3a}, so their average is -\dfrac{b}{3a}.
- f'' > 0 makes f' increasing, so f'(t) \ge f'(1) > 0 for t \ge 1. For x > 1 the mean value theorem gives a t in (1, x) with f(x) - f(1) = f'(t)(x - 1) \ge f'(1)(x - 1), which tends to \infty.
- The segments cross the axis at -2, 1 and 3. Increasing on [-2, 1] and [3, 4], decreasing on [-3, -2] and [1, 3]. Local minima at -2 and 3, local maximum at 1.
- f'' is the slope of each segment: 2 on (-3, -1), -1 on (-1, 2), 1 on (2, 4). Concave up on (-3, -1) and (2, 4), down on (-1, 2). Inflection points at x = -1 and x = 2, the corners, where f'' does not exist.
- f'(1) = 0 makes 1 a critical point, here a local maximum. Inflection points come from the peaks and valleys of the graph of f', at -1 and 2, not from its zeros.
- (x + 2)^2 e^x \ge 0, so f'' has the sign of x - 1, apart from f''(-2) = 0. Concave down on (-\infty, 1), up on (1, \infty). The only inflection point is at x = 1; at -2, f'' is zero but keeps its sign.
- f' has the sign of x - 2 except at its zero -1, so f decreases on (-\infty, 2] and increases on [2, \infty): a local minimum at 2 and no extremum at -1. Write f'(x) = (x + 1)^2 q(x) with q(x) = \dfrac{x - 2}{x^2 + 1}. Then f''(x) = (x + 1)\big[2q(x) + (x + 1)q'(x)\big], and the bracket tends to 2q(-1) = -3, so it is negative near -1. So f'' has the sign of -(x + 1) there: concave up just left of -1, down just right of it.
- B is f, C is f', A is f''. A turns at \displaystyle \frac{\pi}{2} and \displaystyle \frac{3\pi}{2}, where only C is zero, but A falls on \displaystyle \left(0, \frac{\pi}{2}\right) while C is positive there: no graph is the derivative of A, so A is f''. C falls on (0, \pi) while B is positive there, so B is not the derivative of C, and C is the derivative of B; and A is negative where C falls.
- f'(x) = -\dfrac{8}{(x - 2)^3}, positive for x < 2 and negative for x > 2; f''(x) = \dfrac{24}{(x - 2)^4} > 0; \displaystyle f(0) = \frac{4}{4} = 1; the denominator tends to 0 through positive values at 2 and to \infty at the ends. The sketch is two concave-up branches: one rising from y = 0 on the left up the asymptote x = 2, the other falling from it toward y = 0.
- Suppose one exists. For x < 0 the mean value theorem gives a t in (x, 0) with f(0) - f(x) = f'(t)(0 - x). Since f'' < 0, f' is decreasing, so f'(t) > f'(0) > 0, and f(x) = f(0) + f'(t)x < f(0) + f'(0)x. The right side tends to -\infty as x \to -\infty, so f(x) \to -\infty, not 0.
- f(x) = \dfrac{x^2}{2} - \dfrac{x^4}{12} has f''(x) = 1 - x^2, with a local maximum at 0, but f''(0) = 1 > 0, so f is concave up near 0 and has no inflection point there. The peaks and valleys of the graph of f', where f' switches between increasing and decreasing, are the ones that give inflection points.