Unit 4, lesson 38

Sketching Graphs with Derivatives

How to gather the domain, intercepts, symmetry, asymptotes, and the signs of the first and second derivatives into one honest sketch of a graph.

  • Theory part 75
  • Practice part 76
  • Extrema and Shape

Theory, part 75

Practice, part 76

A graphing tool draws a picture from a few hundred sample points, and it can easily miss a narrow peak or draw a steep wall that is really an asymptote. A sketch built from derivatives cannot miss those things, because it is built from facts about the whole function. Each item below adds one piece of information, and the last step puts them together. One function runs through the whole page,

f(x)=x2x2−4.f(x) = \frac{x^2}{x^2 - 4}.

Key terms

Domain

Definition The domain of ff is the set of real numbers xx for which f(x)f(x) is defined. For a formula this means excluding values that make a denominator zero, put a negative number under an even root, or give a logarithm a nonpositive argument.

In plain words Find out first where the function lives. Every later step happens only there.

Example The denominator x2−4x^2 - 4 is zero at x=±2x = \pm 2, so the domain of ff is (−∞,−2)∪(−2,2)∪(2,∞)(-\infty, -2) \cup (-2, 2) \cup (2, \infty).

Intercepts

Definition The yy-intercept is f(0)f(0), provided 00 is in the domain. The xx-intercepts are the numbers xx in the domain with f(x)=0f(x) = 0.

In plain words These are the places where the graph crosses or touches the axes.

Example The value at zero is f(0)=0/(−4)=0f(0) = 0/(-4) = 0, and f(x)=0f(x) = 0 only when x2=0x^2 = 0. So the graph meets both axes at the origin and nowhere else.

Symmetry

Definition Suppose −x-x is in the domain whenever xx is. Then ff is even if f(−x)=f(x)f(-x) = f(x) for every xx in the domain, and its graph is symmetric about the yy-axis. It is odd if f(−x)=−f(x)f(-x) = -f(x) for every xx in the domain, and its graph is symmetric about the origin. A function is periodic with period p>0p > 0 if x+px + p is in the domain whenever xx is and f(x+p)=f(x)f(x + p) = f(x) for every xx in the domain.

In plain words Symmetry halves the work. Sketch the right half and reflect it.

Example The domain is symmetric about 00, and

f(−x)=(−x)2(−x)2−4=x2x2−4=f(x),f(-x) = \frac{(-x)^2}{(-x)^2 - 4} = \frac{x^2}{x^2 - 4} = f(x),

so ff is even. It is enough to study x≥0x \ge 0 and mirror the result in the yy-axis.

Asymptotes

Definition The line x=ax = a is a vertical asymptote if at least one of the one-sided limits lim⁡x→a−f(x)\lim_{x \to a^-} f(x) or lim⁡x→a+f(x)\lim_{x \to a^+} f(x) is ∞\infty or −∞-\infty. The line y=Ly = L is a horizontal asymptote if lim⁡x→∞f(x)=L\lim_{x \to \infty} f(x) = L or lim⁡x→−∞f(x)=L\lim_{x \to -\infty} f(x) = L. The line y=mx+by = mx + b with m≠0m \neq 0 is a slant asymptote if

lim⁡x→∞(f(x)−(mx+b))=0orlim⁡x→−∞(f(x)−(mx+b))=0.\lim_{x \to \infty} \bigl(f(x) - (mx + b)\bigr) = 0 \quad \text{or} \quad \lim_{x \to -\infty} \bigl(f(x) - (mx + b)\bigr) = 0.

In plain words Asymptotes are lines the graph hugs as it runs off to infinity, either upward or downward near a gap, or sideways far out.

Example Dividing top and bottom by x2x^2 gives

f(x)=11−4/x2→1as x→±∞,f(x) = \frac{1}{1 - 4/x^2} \to 1 \quad \text{as } x \to \pm\infty,

so y=1y = 1 is a horizontal asymptote. Near x=2x = 2 the numerator is close to 44. As x→2+x \to 2^+ the denominator is a small positive number, so f(x)→∞f(x) \to \infty, and as x→2−x \to 2^- it is a small negative number, so f(x)→−∞f(x) \to -\infty. By symmetry f(x)→−∞f(x) \to -\infty as x→−2+x \to -2^+ and f(x)→∞f(x) \to \infty as x→−2−x \to -2^-. Both x=2x = 2 and x=−2x = -2 are vertical asymptotes.

Intervals where the function is increasing or decreasing

Definition Let II be an interval. If f′(x)>0f'(x) > 0 at every point of II, then ff is increasing on II, and if f′(x)<0f'(x) < 0 at every point of II, then ff is decreasing on II. To find these intervals, split the domain at the points where f′f' is zero or undefined and test the sign of f′f' on each piece.

In plain words The sign of the derivative tells you, piece by piece, whether the graph goes up or down as you move to the right.

Example By the quotient rule,

f′(x)=2x(x2−4)−x2⋅2x(x2−4)2=−8x(x2−4)2.f'(x) = \frac{2x(x^2 - 4) - x^2 \cdot 2x}{(x^2 - 4)^2} = \frac{-8x}{(x^2 - 4)^2}.

The denominator is positive on the domain, so f′f' has the sign of −8x-8x. The function increases on (−∞,−2)(-\infty, -2) and on (−2,0)(-2, 0), and decreases on (0,2)(0, 2) and on (2,∞)(2, \infty).

Critical points

Definition A critical point of ff is an interior point cc of the domain of ff with f′(c)=0f'(c) = 0 or f′(c)f'(c) undefined. By the first derivative test, if ff is continuous at cc and f′f' changes from positive to negative at cc, then f(c)f(c) is a local maximum, and if f′f' changes from negative to positive, then f(c)f(c) is a local minimum.

In plain words Critical points are the only places inside the domain where a smooth rise can turn into a fall or the other way round.

Example The derivative is zero only at x=0x = 0. The points x=±2x = \pm 2 are not critical points, since they are not in the domain. Since f′f' changes from positive to negative at 00, the value f(0)=0f(0) = 0 is a local maximum.

Concavity

Definition On an open interval where f′′(x)>0f''(x) > 0 at every point, ff is concave up, and where f′′(x)<0f''(x) < 0 at every point, ff is concave down. Split the domain at the zeros of f′′f'' and the points where f′′f'' is undefined, and test each piece.

In plain words Concavity says which way each piece bends, which decides how the graph turns into or away from its asymptotes.

Example Differentiating f′(x)=−8x(x2−4)−2f'(x) = -8x(x^2 - 4)^{-2} gives

f′′(x)=24x2+32(x2−4)3.f''(x) = \frac{24x^2 + 32}{(x^2 - 4)^3}.

The numerator is always positive, so f′′f'' has the sign of (x2−4)3(x^2 - 4)^3. The function is concave up on (−∞,−2)(-\infty, -2) and (2,∞)(2, \infty) and concave down on (−2,2)(-2, 2).

Inflection points

Definition An inflection point is a point (c,f(c))(c, f(c)) of the graph, with ff continuous at cc, at which the concavity changes. The value cc must be in the domain.

In plain words A change of bending that happens across a gap in the domain does not count, because the graph has no point there.

Example The concavity of ff changes only at x=±2x = \pm 2, where ff is undefined. So ff has no inflection points, even though it bends both ways.

Putting the sketch together

Definition A coherent sketch is a graph that agrees with every fact collected above. It respects the domain, passes through the intercepts and the local extreme points, shows the symmetry, approaches each asymptote from the side the limits say, rises and falls where f′f' says, and bends where f′′f'' says. If two facts seem to conflict, one of the computations is wrong.

In plain words Lay out the signs on one table, read the shape of each piece, then draw. Each piece has to make sense on its own and with its neighbors.

Example Here is the whole story for the running function ff.

Intervalf′f'f′′f''Shape
(−∞,−2)(-\infty, -2)positivepositiverising, bending up
(−2,0)(-2, 0)positivenegativerising, bending down
(0,2)(0, 2)negativenegativefalling, bending down
(2,∞)(2, \infty)negativepositivefalling, bending up

On the far left the graph starts just above the line y=1y = 1 and climbs toward ∞\infty at x=−2x = -2. In the middle it rises from −∞-\infty up to the peak (0,0)(0, 0) and falls back to −∞-\infty at x=2x = 2, an upside down arch. On the right it comes down from ∞\infty and levels off just above y=1y = 1. The picture is symmetric in the yy-axis, as it should be. To see that the outer pieces stay above y=1y = 1, note that

f(x)−1=4x2−4>0for ∣x∣>2.f(x) - 1 = \frac{4}{x^2 - 4} > 0 \quad \text{for } \lvert x \rvert > 2.

Check yourself

  1. For f(x)=x3−3x2f(x) = x^3 - 3x^2, find the local extreme points and the inflection point.
Show the answer

The derivative f′(x)=3x(x−2)f'(x) = 3x(x - 2) is positive on (−∞,0)(-\infty, 0), negative on (0,2)(0, 2) and positive on (2,∞)(2, \infty). So (0,0)(0, 0) is a local maximum and (2,−4)(2, -4) a local minimum. The second derivative f′′(x)=6x−6f''(x) = 6x - 6 changes sign at x=1x = 1, so (1,−2)(1, -2) is the inflection point.

  1. Find the symmetry and the horizontal asymptote of f(x)=xx2+1f(x) = \frac{x}{x^2 + 1}.
Show the answer

The domain is all of R\mathbb{R} and

f(−x)=−xx2+1=−f(x),f(-x) = \frac{-x}{x^2 + 1} = -f(x),

so ff is odd and its graph is symmetric about the origin. For x≠0x \neq 0

xx2+1=1/x1+1/x2→0as x→±∞,\frac{x}{x^2 + 1} = \frac{1/x}{1 + 1/x^2} \to 0 \quad \text{as } x \to \pm\infty,

so the line y=0y = 0 is a horizontal asymptote.

  1. Is x=2x = 2 a critical point of f(x)=x2x2−4f(x) = \frac{x^2}{x^2 - 4}, given that f′f' is undefined there?
Show the answer

No. A critical point must be in the domain of ff, and f(2)f(2) is undefined. The line x=2x = 2 is a vertical asymptote instead.

How this lesson connects