Skip to main content
Logo image

APEX Calculus: for University of Lethbridge

Section 3.5 Curve Sketching

We have been learning how we can understand the behavior of a function based on its first and second derivatives. While we have been treating the properties of a function separately (increasing and decreasing, concave up and concave down, etc.), we combine them here to produce an accurate graph of the function without plotting lots of extraneous points.
Why bother? Graphing utilities are very accessible, whether on a computer, a hand-held calculator, or a smartphone. These resources are usually very fast and accurate. We will see that our method is not particularly fast — it will require time (but it is not hard). So again: why bother?
We are attempting to understand the behavior of a function \(f\) based on the information given by its derivatives. While all of a function’s derivatives relay information about it, it turns out that “most” of the behavior we care about is explained by \(\fp\)and \(\fpp\text{.}\) Understanding the interactions between the graph of \(f\) and \(\fp\)and \(\fpp\)is important. To gain this understanding, one might argue that all that is needed is to look at lots of graphs. This is true to a point, but is somewhat similar to stating that one understands how an engine works after looking only at pictures. It is true that the basic ideas will be conveyed, but “hands-on” access increases understanding.
Key Idea 3.5.1 summarizes what we have learned so far that is applicable to sketching graphs of functions and gives a framework for putting that information together. It is followed by several examples.

Key Idea 3.5.1. Curve Sketching.

To produce an accurate sketch a given function \(f\text{,}\) consider the following steps.
  1. Find the domain of \(f\text{.}\) Generally, we assume that the domain is the entire real line then find restrictions, such as where a denominator is \(0\) or where negatives appear under the radical.
  2. Find the critical values of \(f\text{.}\)
  3. Find the possible points of inflection of \(f\text{.}\)
  4. Find the location of any vertical asymptotes of \(f\) (usually done in conjunction with Item 1).
  5. Consider the limits \(\lim\limits_{x\to-\infty}f(x)\) and \(\lim\limits_{x\to\infty}f(x)\) to determine the end behavior of the function.
  6. Create a number line that includes all critical points, possible points of inflection, and locations of vertical asymptotes. For each interval created, determine whether \(f\) is increasing or decreasing, concave up or down.
  7. Evaluate \(f\) at each critical point and possible point of inflection. Plot these points on a set of axes. Connect these points with curves exhibiting the proper concavity. Sketch asymptotes and \(x\) and \(y\) intercepts where applicable.

Example 3.5.2. Curve sketching.

Use Key Idea 3.5.1 to sketch \(f(x) = 3x^3-10x^2+7x+5\text{.}\)
Solution 1.
We follow the steps outlined in Key Idea 3.5.1.
  1. The domain of \(f\) is the entire real line; there are no values \(x\) for which \(f(x)\) is not defined.
  2. Find the critical values of \(f\text{.}\) We compute \(\fp(x) = 9x^2-20x+7\text{.}\) Use the Quadratic Formula to find the roots of \(\fp\text{:}\)
    \begin{align*} x \amp= \frac{20\pm \sqrt{(-20)^2-4(9)(7)}}{2(9)}\\ \amp = \frac19\left(10\pm\sqrt{37}\right)\\ x \amp \approx 0.435, 1.787\text{.} \end{align*}
  3. Find the possible points of inflection of \(f\text{.}\) Compute \(\fpp(x) = 18x-20\text{.}\) We have
    \begin{align*} \fpp(x) \amp = 0\\ 18x-20 \amp =0\\ x \amp = 10/9\\ \amp \approx 1.111\text{.} \end{align*}
  4. There are no vertical asymptotes.
  5. We determine the end behavior using limits as \(x\) approaches \(\pm \infty \text{.}\)
    \begin{equation*} \lim_{x\to -\infty} f(x) = -\infty \qquad \lim_{x\to \infty}f(x) = \infty\text{.} \end{equation*}
    We do not have any horizontal asymptotes.
  6. We place the values \(x=(10\pm\sqrt{37})/9\) and \(x=10/9\) on a number line, as shown in Figure 3.5.3. We mark each subinterval as increasing or decreasing, concave up or down, using the techniques used in Sections 3.3–3.4.
  7. Evaluate \(f\) at each critical number and possible inflection point.
    \begin{align*} f(0.435)\amp\approx6.400\amp f(1.111)\amp\approx4.547\amp f(1.787)\amp\approx 2.695 \end{align*}
    We plot the appropriate points on axes as shown in Figure 3.5.4.(a) and connect the points with straight lines (to show increasing/decreasig behavior). In Figure 3.5.4.(b) we adjust these lines to demonstrate the proper concavity. In Figure 3.5.4.(c) we show a graph of \(f\) drawn with a computer program, verifying the accuracy of our sketch.
Number line showing intervals where f is increasing/decreasing and concave up/down
A number line is shown, on which three points are marked. The first point is marked as \(\frac19(10-\sqrt{37})\text{,}\) or approximately \(0.435\text{;}\) it is a critical point of \(f\text{,}\) and a relative maximum.
The second point is marked as \(\frac{10}{9}\text{,}\) or approximately \(1.111\text{;}\) it is an inflection point of \(f\text{.}\)
The last point is marked as \(\frac19(10+\sqrt{37})\text{,}\) or approximately \(1.787\text{;}\) it is a critical point of \(f\text{,}\) and a relative minimum.
These points divide the number line into four intervals. Above each interval, the signs of both \(\fp\) and \(\fpp\) are given, along with whether \(f\) is increasing or decreasing, and concave up or down.
This information is as follows:
  • For \(x\lt 0.435\text{,}\) \(\fp\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp\lt 0\text{,}\) so \(f\) is concave down.
  • For \(0.435\lt x\lt 1.111\text{,}\) \(\fp\lt 0\text{,}\) so \(f\) is decreasing, and \(\fpp\lt 0\text{,}\) so \(f\) is concave down.
  • For \(1.111\lt x\lt 1.787\text{,}\) \(\fp\lt 0\text{,}\) so \(f\) is decreasing, and \(\fpp\gt 0\text{,}\) so \(f\) is concave up.
  • For \(x\gt 1.787\text{,}\) \(\ft\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp\gt 0\text{,}\) so \(f\) is concave up.
Figure 3.5.3. Number line for \(f\) in Example 3.5.2
A hand-drawn graph based on the critical points from the number line.
The graph is hand-drawn with plotted significant points from the number line. It connects these points with straight lines to give a general impression of the graph’s shape.
(a)
Adjusted graph for proper concavity.
The image shows an adjusted graph of the piecewise linear function. The function is now a smooth, continuous curve that crosses the \(y\)-axis at \(y=5\text{.}\) This adjustment demonstrates the proper concavity of the function.
(b)
Computer-generated graph for accuracy verification.
The image shows a computer-generated graph of the function. The graph verifies the accuracy of our sketch: there is very little difference between this graph and the previous graph, showing that accounting for concavity helps to ensure an accurate sketch.
(c)
Figure 3.5.4. Sketching \(f\) in Example 3.5.2
Solution 2. Video solution

Example 3.5.5. Curve sketching.

Sketch \(\ds f(x) = \frac{x^2-x-2}{x^2-x-6}\text{.}\)
Solution 1.
We again follow the steps outlined in Key Idea 3.5.1.
  1. In determining the domain, we assume it is all real numbers and look for restrictions. We find that at \(x=-2\) and \(x=3\text{,}\) \(f(x)\) is not defined. So the domain of \(f\) is \(D = \{ x \mid x\neq -2,3\}\text{.}\)
  2. To find the critical values of \(f\text{,}\) we first find \(\fp(x)\text{.}\) Using the Quotient Rule, we find
    \begin{equation*} \fp(x) = \frac{-8x+4}{(x^2+x-6)^2} = \frac{-8x+4}{(x-3)^2(x+2)^2}\text{.} \end{equation*}
    We get \(\fp(x) = 0\) when \(x = 1/2\text{,}\) and \(\fp\) is undefined when \(x=-2,3\text{.}\) Since \(\fp\)is undefined only when \(f\) is also undefined, these are not critical values. The only critical value is \(x=1/2\text{.}\)
  3. To find the possible points of inflection, we find \(\fpp(x)\text{,}\) again employing the Quotient Rule:
    \begin{equation*} \fpp(x) = \frac{24x^2-24x+56}{(x-3)^3(x+2)^3}\text{.} \end{equation*}
    We find that \(\fpp(x)\) is never \(0\) (setting the numerator equal to \(0\) and solving for \(x\text{,}\) we find the only roots to this quadratic are not real numbers) and \(\fpp\)is undefined when \(x=-2,3\text{.}\) Thus concavity will possibly only change at \(x=-2\) and \(x=3\) (which are not in the domain of \(f\text{,}\) so these won’t be inflection points).
  4. The vertical asymptotes of \(f\) are at \(x=-2\) and \(x=3\text{,}\) the places where \(f\) is undefined.
  5. There is a horizontal asymptote of \(y=1\text{,}\) as \(\lim\limits_{x\to -\infty}f(x) = 1\) and \(\lim\limits_{x\to\infty}f(x) =1\text{.}\)
  6. We place the values \(x=1/2\text{,}\) \(x=-2\) and \(x=3\) on a number line as shown in Figure 3.5.6. We mark in each interval whether \(f\) is increasing or decreasing, concave up or down. We see that \(f\) has a relative maximum at \(x=1/2\text{;}\) concavity changes only at the vertical asymptotes.
  7. Evaluate \(f\) at each critical number.
    \begin{align*} f(0)\amp=1/3\amp f(1/2)\amp=9/25 \end{align*}
    In Figure 3.5.7.(a), we plot the points from the number line on a set of axes and connect the points with straight lines to get a general idea of what the function looks like (these lines effectively only convey increasing/decreasing information). In Figure 3.5.7.(b), we adjust the graph with the appropriate concavity. We also show \(f\) crossing the \(x\)-axis at \(x=-1\) and \(x=2\) and crossing the \(y\)-axis at \(y=1/3\text{.}\) Finally, Figure 3.5.7.(c) shows a computer generated graph of \(f\text{,}\) which verifies the accuracy of our sketch.
Number line showing intervals where f is increasing/decreasing and concave up/down
On a number line there are three marked points: \(-2\text{,}\) \(\frac12\text{,}\) and \(3\text{.}\) At \(x=-2\) and \(x=3\text{,}\) the graph of \(f\) has a vertical asymptote. The point \(x=\frac12\) is a critical point of \(f\text{,}\) and a relative maximum.
These three points divide the number line into four intervals. Above each interval, the following information is indicated:
  • For \(x\lt -2\text{,}\) \(\fp\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp\gt 0\text{,}\) so \(f\) is concave up.
  • For \(-2\lt x\lt \frac12\text{,}\) \(\fp\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp\lt 0\text{,}\) so \(f\) is concave down.
  • For \(\frac12\lt x\lt 3\text{,}\) \(\fp\lt 0\text{,}\) so \(f\) is decreasing, and \(\fpp\lt 0\text{,}\) so \(f\) is concave down.
  • For \(x\gt 3\text{,}\) \(\fp\lt 0\text{,}\) so \(f\) is decreasing, and \(\fpp\gt 0\text{,}\) so \(f\) is concave up.
Figure 3.5.6. Number line for \(f\) in Example 3.5.5
A linear piecewise graph showing changes in concavity.
The figure shows a linear piecewise graph on a Cartesian plane with the \(x\)-axis ranging from \(-5\) to \(5\text{,}\) and the \(y\)-axis from \(-5\) to \(5\text{.}\) The graph consists of two line segments forming a V shape, with the tip intersecting the \(x\)-axis at \(x = 0.5\text{.}\)
(a)
A concave adjusted graph.
The image displays an adjusted version of the piecewise graph, now with concavity.
(b)
Computer generated graph for accuracy verification.
The image shows a computer-generated graph of the function. The graph verifies the accuracy of our sketch: there is very little difference between this graph and the previous graph, showing that accounting for concavity helps to ensure an accurate sketch.
(c)
Figure 3.5.7. Sketching \(f\) in Example 3.5.5
Solution 2. Video solution

Example 3.5.8. Curve sketching.

Sketch \(f(x) = \dfrac{5(x-2)(x+1)}{x^2+2x+4}\text{.}\)
Solution.
We again follow Key Idea 3.5.1.
  1. We assume that the domain of \(f\) is all real numbers and consider restrictions. The only restrictions could come when the denominator is \(0\text{,}\) but this never occurs because the denominator is a quadratic polynomial with no real roots. Therefore the domain of \(f\) is all real numbers, \(\mathbb{R}\text{.}\)
  2. We find the critical values of \(f\) by setting \(\fp(x)=0\) and solving for \(x\text{.}\) We find
    \begin{align*} \fp(x) \amp = \frac{15x(x+4)}{(x^2+2x+4)^2}\\ 0 \amp =\frac{15x(x+4)}{(x^2+2x+4)^2}\\ x \amp =-4,0\text{.} \end{align*}
    Since the denominator of \(\fp\) is just the square of the denominator of \(f\text{,}\) there are no values of \(x\) for which \(\fp\) is undefined.
  3. We find the possible points of inflection by solving \(\fpp(x) = 0\) for \(x\) (again, there are no values of \(x\) for which \(\fpp\) is undefined.) We find
    \begin{equation*} \fpp(x) = -\frac{30x^3+180x^2-240}{(x^2+2x+4)^3}\text{.} \end{equation*}
    The cubic in the numerator does not factor very “nicely.” We instead approximate the roots (using a CAS) at \(x= -5.759\text{,}\) \(x=-1.305\) and \(x=1.064\text{.}\)
  4. There are no vertical asymptotes as the denominator never equals zero.
  5. We have a horizontal asymptote of \(y=5\text{,}\) as \(\lim\limits_{x\to-\infty}f(x) = \lim\limits_{x\to\infty}f(x) = 5\text{.}\)
  6. We place the critical points and possible points on a number line as shown in Figure 3.5.9 and mark each interval as increasing/decreasing, concave up/down appropriately.
  7. Evaluate \(f\) at each critical number, possible inflection point.
    \begin{align*} f(-5.759)\amp\approx7.200\amp f(-4)\amp=7.5\\ f(-1.305)\amp\approx1.630\amp f(0)\amp=2.5\\ f(1.064)\amp\approx-1.331 \end{align*}
    In Figure 3.5.10.(a) we plot the significant points from the number line as well as the \(x\)- and \(y\)-intercepts, and connect the points with straight lines to get a general impression about the graph (this graph only includes increasing/decreasing information). In Figure 3.5.10.(b), we add concavity, drawing the function so that it is smooth (since \(f\) is differentiable everywhere, there should be no kinks or corners). Figure 3.5.10.(c) shows a computer generated graph of \(f\text{,}\) affirming our results.
Number line showing intervals where f is increasing/decreasing and concave up/down
A number line is shown, on which five points are marked. The points are labeled, from left to right, as \(-5.579\text{,}\) \(-4\text{,}\) \(-1.305\text{,}\) \(0\text{,}\) and \(1.064\text{.}\) The points \(x=-4\) and \(x=0\) are the critical points of \(f\text{.}\)
The three decimal values are the possible inflection points of \(f\text{,}\) which had to be approximated using software. These points divide the number line into six intervals; above each interval, the following information is indicated:
  • For \(x\lt -5.579\text{,}\) \(\fp\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp \gt 0\text{,}\) so \(f\) is concave up.
  • For \(-5.579\lt x\lt -4\text{,}\) \(\fp\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp \lt 0\text{,}\) so \(f\) is concave down.
  • For \(-4\lt x\lt -1.305\text{,}\) \(\fp\lt 0\text{,}\) so \(f\) is decreasing, and \(\fpp \lt 0\text{,}\) so \(f\) is concave down.
  • For \(-1.305\lt x\lt 0\text{,}\) \(\fp\lt 0\text{,}\) so \(f\) is decreasing, and \(\fpp \gt 0\text{,}\) so \(f\) is concave up.
  • For \(0\lt x\lt 1.064\text{,}\) \(\fp\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp \gt 0\text{,}\) so \(f\) is concave up.
  • For \(x\gt 1.064\text{,}\) \(\fp\gt 0\text{,}\) so \(f\) is increasing, and \(\fpp \lt 0\text{,}\) so \(f\) is concave down.
Figure 3.5.9. Number line for \(f\) in Example Example 3.5.8
A hand-drawn graph based on the critical points from the number line.
The graph is hand-drawn with plotted significant points from the number line. It connects these points with straight lines to give a general impression of the graph’s shape.
(a)
A hand-drawn graph with concavity.
The graph is hand-drawn with plotted significant points from the number line. It connects these points with smooth curves to give a general impression of the graph’s shape.
(b)
A computer generated graph of the function.
The graph is a computer generated graph of the function, showing the same critical points as the hand-drawn graph.
(c)
Figure 3.5.10. Sketching \(f\) in Example 3.5.8
To get some more practice with curve sketching, we include a few more video examples to illustrate the process. (The last of these could be considered “archival footage”: it was from a first run at using our new lightboard.)
Figure 3.5.11. Sketching the polynomial \(f(x)=x^2(5-x)^3\)
Figure 3.5.12. Sketching the graph of the trigonometric function \(f(x)=\sin(2x)-2\sin(x)\)
Figure 3.5.13. Sketching the graph of \(f(x)=x^{4/3}-4x^{1/3}\)
In each of our examples, we found a few significant points on the graph of \(f\) that corresponded to changes in increasing/decreasing or concavity. We connected these points with straight lines, then adjusted for concavity, and finished by showing a very accurate, computer generated graph.
Why are computer graphics so good? It is not because computers are “smarter” than we are. Rather, it is largely because computers are much faster at computing than we are. In general, computers graph functions much like most students do when first learning to draw graphs: they plot equally spaced points, then connect the dots using lines. By using lots of points, the connecting lines are short and the graph looks smooth.
This does a fine job of graphing in most cases (in fact, this is the method used for many graphs in this text). However, in regions where the graph is very “curvy,” this can generate noticeable sharp edges on the graph unless a large number of points are used. High quality computer algebra systems, such as Mathematica and Sage, use special algorithms to plot lots of points only where the graph is “curvy.”
In Figure 3.5.14, two graph of \(y=\sin(x)\) is given, generated by Sage and Mathematica. The small points represent each of the places where each CAS sampled the function. Notice how at the “bends” of \(\sin(x)\text{,}\) lots of points are used; where \(\sin(x)\) is relatively straight, fewer points are used. (In the Mathematica plot, many points are also used at the endpoints to ensure the “end behavior” is accurate.)
A graph of \(y = \sin(x)\) generated by Sage.
The plot features a solid blue curve representing the sine wave. The \(x\)-axis is labeled from \(0\) to \(6\text{,}\) and the \(y\)-axis ranges from \(-1\) to \(1\text{.}\) Sample points are marked along the curve with blue dots, indicating the places where the function was sampled.
(a) Sage output
Mathematica plot of the sine graph
The same plot of the sine function, showing the location of the sample points. This version comes from the software Mathematica. In addition to more frequent sampling in areas with more curvature, Mathematica also uses extra sample points at the ends of the domain.
(b) Mathematica output
Figure 3.5.14. CAS plots of \(y=\sin(x)\) illustrating the sample points
How does Sage know where the graph is “curvy”? Calculus. When we study curvature in a later chapter, we will see how the first and second derivatives of a function work together to provide a measurement of “curviness.” Sage employs algorithms to determine regions of “high curvature” and plots extra points there.
Again, the goal of this section is not “How to graph a function when there is no computer to help.” Rather, the goal is “Understand that the shape of the graph of a function is largely determined by understanding the behavior of the function at a few key places.” In Example 3.5.8, we were able to accurately sketch a complicated graph using only five points and knowledge of asymptotes!
There are many applications of our understanding of derivatives beyond curve sketching. The next chapter explores some of these applications, demonstrating just a few kinds of problems that can be solved with a basic knowledge of differentiation.

Exercises Exercises

Terms and Concepts

1.
Why is sketching curves by hand beneficial even though technology is ubiquitous?
2.
What does “ubiquitous” mean?
3.
T/F: When sketching graphs of functions, it is useful to find the critical points.
  • True
  • False
4.
T/F: When sketching graphs of functions, it is useful to find the possible points of inflection.
  • True
  • False
5.
T/F: When sketching graphs of functions, it is useful to find the horizontal and vertical asymptotes.
  • True
  • False

Problems

Exercise Group.
In the following exercises, practice using Key Idea 3.5.1 by applying the principles to the given functions with familiar graphs.
Exercise Group.
In the following exercises, sketch a graph of the given function using Key Idea 3.5.1. Show all work; check your answer with technology.
13.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = -x^3+5x^2-3x+2\)
17.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = (x-2)^2\ln(x-2)\)
18.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = \frac{x^2-4}{x^2}\)
19.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = \frac{x^2-4x+3}{x^2-6x+8}\)
20.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = \frac{x^2-2x+1}{x^2-6x+8}\)
23.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = \sin(x) \cos(x)\) on \([-\pi,\pi]\)
24.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = (x-3)^{2/3} + 2\)
25.
Use Key Idea 3.5.1 to sketch a graph of \(\ds f(x) = \frac{(x-1)^{2/3}}{x}\)
Exercise Group.
In the following exercises, a function with the parameters \(a\) and \(b\) are given. Describe the critical points and possible points of inflection of \(f\) in terms of \(a\) and \(b\text{.}\)
26.
\(\ds f(x) = \frac{a}{x^2+b^2}\)
  1. Find the critical points of \(f\text{.}\)
  2. Find the inflection points of \(f\text{.}\)
27.
\(\ds f(x) = \sin(ax+b)\)
  1. Find the critical points of \(f\text{.}\)
  2. Find the inflection points of \(f\text{.}\)
28.
\(\ds f(x) = (x-a)(x-b)\)
  1. Find the critical points of \(f\text{.}\)
  2. Find the inflection points of \(f\text{.}\)
29.
Given \(x^2+y^2=1\text{,}\) use implicit differentiation to find \(\frac{dy}{dx}\) and \(\frac{d^2y}{dx^2}\text{.}\) Use this information to justify the sketch of the unit circle.