Curve sketching

A graphing calculator draws a graph quickly. But it can hide important features, such as a peak that is too small to see or an asymptote far away. Calculus tells us exactly where the important points are. In this section, we put everything together to sketch a graph by hand.

A checklist for sketching a graph

  1. Domain. Find where $f(x)$ is defined.
  2. Intercepts. The $y$-intercept is $f(0)$. The $x$-intercepts are the solutions of $f(x)=0$ (skip them if the equation is too hard).
  3. Symmetry.
    • If $f(-x)=f(x)$, then $f$ is even. Its graph is symmetric about the $y$-axis: the left half is a mirror image of the right half.
    • If $f(-x)=-f(x)$, then $f$ is odd. Its graph is symmetric about the origin: turning it half a turn gives the same graph.
  4. Asymptotes. Find vertical and horizontal asymptotes with limits. (See infinite limits and limits at infinity.)
  5. Increasing and decreasing. Find where $f'$ is positive and where it is negative.
  6. Local maximum and minimum values. Use the first or second derivative test.
  7. Concavity and inflection points. Find where $f''$ is positive and where it is negative.
  8. Sketch. Plot the special points, draw the asymptotes as dashed lines, and connect the points with the right shape.

Steps 5 to 7 use the shape of a graph.

Example 1: Sketch the graph of

$f(x)=x^4-2x^2$.

Solution:

1. Domain: all real numbers. $f$ is a polynomial.

2. Intercepts: $f(0)=0$, so the $y$-intercept is $0$. For the $x$-intercepts, factor:

$x^4-2x^2=x^2(x^2-2)=0$

So $x=0$ or $x=\pm\sqrt{2}\approx\pm 1.41$.

3. Symmetry:

$\begin{align*}&f(-x)\\&=(-x)^4-2(-x)^2\\&=x^4-2x^2=f(x)\end{align*}$

So $f$ is even, and the graph is symmetric about the $y$-axis.

4. Asymptotes: none. A polynomial has no asymptotes.

5. Increasing and decreasing:

$\begin{align*}&f'(x)\\&=4x^3-4x\\&=4x(x-1)(x+1)\end{align*}$

The critical numbers are $-1$, $0$, and $1$.

IntervalSign of $f'$$f$ is
$(-\infty,-1)$$-$decreasing
$(-1,0)$$+$increasing
$(0,1)$$-$decreasing
$(1,\infty)$$+$increasing

6. Local extremes:

  • Local minimum values: $f(-1)=-1$ and $f(1)=-1$.
  • Local maximum: $f(0)=0$.

7. Concavity: $f''(x)=12x^2-4$. It is $0$ when $x^2=\dfrac{1}{3}$, so

$x=\pm\dfrac{1}{\sqrt{3}}\approx\pm 0.58$.

  • For $|x|>\dfrac{1}{\sqrt{3}}$: $f''>0$, concave up.
  • For $|x|<\dfrac{1}{\sqrt{3}}$: $f''<0$, concave down.

The inflection points are at $x=\pm\dfrac{1}{\sqrt{3}}$, where

$f\left(\pm\dfrac{1}{\sqrt{3}}\right)=\dfrac{1}{9}-\dfrac{2}{3}=-\dfrac{5}{9}$.

8. Sketch:

(−1, −1)(1, −1)√2−√2xy
The graph of $f(x)=x^4-2x^2$. The teal points are the inflection points.

Example 2: Sketch the graph of

$f(x)=\dfrac{2x^2}{x^2-1}$.

Solution:

1. Domain: The denominator is $0$ when $x$ is $1$ or $-1$. So the domain is all real numbers except $-1$ and $1$.

2. Intercepts: $f(0)=0$. And $f(x)=0$ only when $x=0$. So the only intercept is the origin.

3. Symmetry: $f(-x)=f(x)$, so $f$ is even.

4. Asymptotes:

Horizontal. Divide the numerator and denominator by $x^2$:

$\displaystyle\lim_{x\to\pm\infty}\dfrac{2}{1-1/x^2}=2$

So $y=2$ is a horizontal asymptote.

Vertical. At $x=1$, the denominator is $0$ and the numerator is $2$. Look at the signs:

  • As $x\to 1^+$, $x^2-1$ is a small positive number, so $f(x)\to\infty$.
  • As $x\to 1^-$, $x^2-1$ is a small negative number, so $f(x)\to-\infty$.

So $x=1$ is a vertical asymptote. By symmetry, so is $x=-1$.

5. Increasing and decreasing: Use the quotient rule:

$\begin{align*}&f'(x)\\&=\dfrac{4x(x^2-1)-2x^2\cdot 2x}{(x^2-1)^2}\\&=\dfrac{-4x}{(x^2-1)^2}\end{align*}$

The denominator is always positive, so the sign of $f'$ is the sign of $-4x$:

  • For $x<0$: $f'(x)>0$, so $f$ increases.
  • For $x>0$: $f'(x)<0$, so $f$ decreases.

(Leave out $-1$ and $1$, which are not in the domain.)

6. Local extremes: $f'$ changes from $+$ to $-$ at $0$. So $f$ has a local maximum:

$f(0)=0$

7. Concavity: Differentiating $f'$ again and simplifying gives

$f''(x)=\dfrac{12x^2+4}{(x^2-1)^3}$.

The numerator is always positive. So the sign of $f''$ is the sign of $(x^2-1)^3$:

  • For $|x|>1$: $f''>0$, concave up.
  • For $|x|<1$: $f''<0$, concave down.

The concavity changes only at $\pm 1$, which are not in the domain. So there are no inflection points.

8. Sketch:

x = 1x = −1y = 2xy
The graph of $f(x)=\dfrac{2x^2}{x^2-1}$, with its asymptotes drawn as dashed lines.

Example 3: Sketch the graph of

$f(x)=e^{-x^2/2}$.

Solution:

1. Domain: all real numbers.

2. Intercepts: $f(0)=e^0=1$.

The function is always positive, so there are no $x$-intercepts.

3. Symmetry: $f(-x)=f(x)$, so $f$ is even.

4. Asymptotes: As $x\to\pm\infty$, the exponent $-\dfrac{x^2}{2}\to-\infty$, so $f(x)\to 0$. The line $y=0$ (the $x$-axis) is a horizontal asymptote. There are no vertical asymptotes.

5. Increasing and decreasing: By the chain rule,

$f'(x)=-xe^{-x^2/2}$.

The factor $e^{-x^2/2}$ is always positive, so the sign of $f'$ is the sign of $-x$:

  • For $x<0$: $f'(x)>0$, so $f$ increases.
  • For $x>0$: $f'(x)<0$, so $f$ decreases.

6. Local extremes: a local maximum (also the absolute maximum), $f(0)=1$.

7. Concavity: By the product rule,

$\begin{align*}&f''(x)\\&=-e^{-x^2/2}+(-x)(-x)e^{-x^2/2}\\&=(x^2-1)e^{-x^2/2}\end{align*}$

  • For $|x|>1$: $f''>0$, concave up.
  • For $|x|<1$: $f''<0$, concave down.

The inflection points are at $x=\pm 1$, where $f(\pm 1)=e^{-1/2}\approx 0.61$.

8. Sketch:

(0, 1)(1, 0.61)(−1, 0.61)xy
The graph of $f(x)=e^{-x^2/2}$, the bell curve.

This bell-shaped curve is very important in statistics. It describes how measurements spread around an average.

Summary