We've updated our

TEXT

# The Second Derivative Test and Curve Sketching

### Learning Objectives

• Use concavity and inflection points to explain how the sign of the second derivative affects the shape of a function’s graph.
• Explain the concavity test for a function over an open interval.
• Explain the relationship between a function and its first and second derivatives.
• State the second derivative test for local extrema.
• Analyze a function and its derivatives to draw its graph.

# Concavity and Points of Inflection

We now know how to determine where a function is increasing or decreasing. However, there is another issue to consider regarding the shape of the graph of a function. If the graph curves, does it curve upward or curve downward? This notion is called the concavity of the function.

(Figure)(a) shows a function $f$ with a graph that curves upward. As $x$ increases, the slope of the tangent line increases. Thus, since the derivative increases as $x$ increases, $f^{\prime}$ is an increasing function. We say this function $f$ is concave up. (Figure)(b) shows a function $f$ that curves downward. As $x$ increases, the slope of the tangent line decreases. Since the derivative decreases as $x$ increases, $f^{\prime}$ is a decreasing function. We say this function $f$ is concave down.

### Definition

Let $f$ be a function that is differentiable over an open interval $I$. If $f^{\prime}$ is increasing over $I$, we say $f$ is concave up over $I$. If $f^{\prime}$ is decreasing over $I$, we say $f$ is concave down over $I$.

Figure 5. (a), (c) Since $f^{\prime}$ is increasing over the interval $(a,b)$, we say $f$ is concave up over $(a,b)$. (b), (d) Since $f^{\prime}$ is decreasing over the interval $(a,b)$, we say $f$ is concave down over $(a,b)$.

In general, without having the graph of a function $f$, how can we determine its concavity? By definition, a function $f$ is concave up if $f^{\prime}$ is increasing. From Corollary 3, we know that if $f^{\prime}$ is a differentiable function, then $f^{\prime}$ is increasing if its derivative $f^{\prime \prime}(x)>0$. Therefore, a function $f$ that is twice differentiable is concave up when $f^{\prime \prime}(x)>0$. Similarly, a function $f$ is concave down if $f^{\prime}$ is decreasing. We know that a differentiable function $f^{\prime}$ is decreasing if its derivative $f^{\prime \prime}(x)<0$. Therefore, a twice-differentiable function $f$ is concave down when $f^{\prime \prime}(x)<0$. Applying this logic is known as the concavity test.

### Test for Concavity

Let $f$ be a function that is twice differentiable over an interval $I$.

1. If $f^{\prime \prime}(x)>0$ for all $x \in I$, then $f$ is concave up over $I$.
2. If $f^{\prime \prime}(x)<0$ for all $x \in I$, then $f$ is concave down over $I$.

We conclude that we can determine the concavity of a function $f$ by looking at the second derivative of $f$. In addition, we observe that a function $f$ can switch concavity ((Figure)). However, a continuous function can switch concavity only at a point $x$ if $f^{\prime \prime}(x)=0$ or $f^{\prime \prime}(x)$ is undefined. Consequently, to determine the intervals where a function $f$ is concave up and concave down, we look for those values of $x$ where $f^{\prime \prime}(x)=0$ or $f^{\prime \prime}(x)$ is undefined. When we have determined these points, we divide the domain of $f$ into smaller intervals and determine the sign of $f^{\prime \prime}$ over each of these smaller intervals. If $f^{\prime \prime}$ changes sign as we pass through a point $x$, then $f$ changes concavity. It is important to remember that a function $f$ may not change concavity at a point $x$ even if $f^{\prime \prime}(x)=0$ or $f^{\prime \prime}(x)$ is undefined. If, however, $f$ does change concavity at a point $a$ and $f$ is continuous at $a$, we say the point $(a,f(a))$ is an inflection point of $f$.

### Definition

If $f$ is continuous at $a$ and $f$ changes concavity at $a$, the point $(a,f(a))$ is an inflection point of $f$.

Figure 6. Since $f^{\prime \prime}(x)>0$ for $x<a$, the function $f$ is concave up over the interval $(−\infty,a)$. Since $f^{\prime \prime}(x)<0$ for $x>a$, the function $f$ is concave down over the interval $(a,\infty)$. The point $(a,f(a))$ is an inflection point of $f$.

### Testing for Concavity

For the function $f(x)=x^3-6x^2+9x+30$, determine all intervals where $f$ is concave up and all intervals where $f$ is concave down. List all inflection points for $f$. Use a graphing utility to confirm your results.

To determine concavity, we need to find the second derivative $f^{\prime \prime}(x)$. The first derivative is $f^{\prime}(x)=3x^2-12x+9$, so the second derivative is $f^{\prime \prime}(x)=6x-12$. If the function changes concavity, it occurs either when $f^{\prime \prime}(x)=0$ or $f^{\prime \prime}(x)$ is undefined. Since $f^{\prime \prime}$ is defined for all real numbers $x$, we need only find where $f^{\prime \prime}(x)=0$. Solving the equation $6x-12=0$, we see that $x=2$ is the only place where $f$ could change concavity. We now test points over the intervals $(−\infty ,2)$ and $(2,\infty)$ to determine the concavity of $f$. The points $x=0$ and $x=3$ are test points for these intervals.

Interval Test Point Sign of $f^{\prime \prime}(x)=6x-12$ at Test Point Conclusion
$(−\infty ,2)$ $x=0$ $-$ $f$ is concave down
$(2,\infty )$ $x=3$ $+$ $f$ is concave up.

We conclude that $f$ is concave down over the interval $(−\infty ,2)$ and concave up over the interval $(2,\infty)$. Since $f$ changes concavity at $x=2$, the point $(2,f(2))=(2,32)$ is an inflection point. (Figure) confirms the analytical results.

Figure 7. The given function has a point of inflection at $(2,32)$ where the graph changes concavity.

For $f(x)=−x^3+\frac{3}{2}x^2+18x$, find all intervals where $f$ is concave up and all intervals where $f$ is concave down.

$f$ is concave up over the interval $(−\infty ,\frac{1}{2})$ and concave down over the interval $(\frac{1}{2},\infty )$

#### Hint

Find where $f^{\prime \prime}(x)=0$.

We now summarize, in (Figure), the information that the first and second derivatives of a function $f$ provide about the graph of $f$, and illustrate this information in (Figure).

What Derivatives Tell Us about Graphs
Sign of $f^{\prime}$ Sign of $f^{\prime \prime}$ Is $f$ increasing or decreasing? Concavity
Positive Positive Increasing Concave up
Positive Negative Increasing Concave down
Negative Positive Decreasing Concave up
Negative Negative Decreasing Concave down
Figure 8. Consider a twice-differentiable function $f$ over an open interval $I$. If $f^{\prime}(x)>0$ for all $x \in I$, the function is increasing over $I$. If $f^{\prime}(x)<0$ for all $x \in I$, the function is decreasing over $I$. If $f^{\prime \prime}(x)>0$ for all $x \in I$, the function is concave up. If $f^{\prime \prime}(x)<0$ for all $x \in I$, the function is concave down on $I$.

# The Second Derivative Test

The first derivative test provides an analytical tool for finding local extrema, but the second derivative can also be used to locate extreme values. Using the second derivative can sometimes be a simpler method than using the first derivative.

We know that if a continuous function has a local extrema, it must occur at a critical point. However, a function need not have a local extrema at a critical point. Here we examine how the second derivative test can be used to determine whether a function has a local extremum at a critical point. Let $f$ be a twice-differentiable function such that $f^{\prime}(a)=0$ and $f^{\prime \prime}$ is continuous over an open interval $I$ containing $a$. Suppose $f^{\prime \prime}(a)<0$. Since $f^{\prime \prime}$ is continuous over $I$, $f^{\prime \prime}(x)<0$ for all $x \in I$ ((Figure)). Then, by Corollary 3, $f^{\prime}$ is a decreasing function over $I$. Since $f^{\prime}(a)=0$, we conclude that for all $x \in I, \, f^{\prime}(x)>0$ if $x<a$ and $f^{\prime}(x)<0$ if $x>a$. Therefore, by the first derivative test, $f$ has a local maximum at $x=a$. On the other hand, suppose there exists a point $b$ such that $f^{\prime}(b)=0$ but $f^{\prime \prime}(b)>0$. Since $f^{\prime \prime}$ is continuous over an open interval $I$ containing $b$, then $f^{\prime \prime}(x)>0$ for all $x \in I$ ((Figure)). Then, by Corollary $3, \, f^{\prime}$ is an increasing function over $I$. Since $f^{\prime}(b)=0$, we conclude that for all $x \in I$, $f^{\prime}(x)<0$ if $x<b$ and $f^{\prime}(x)>0$ if $x>b$. Therefore, by the first derivative test, $f$ has a local minimum at $x=b$.

Figure 9. Consider a twice-differentiable function $f$ such that $f^{\prime \prime}$ is continuous. Since $f^{\prime}(a)=0$ and $f^{\prime \prime}(a)<0$, there is an interval $I$ containing $a$ such that for all $x$ in $I$, $f$ is increasing if $x<a$ and $f$ is decreasing if $x>a$. As a result, $f$ has a local maximum at $x=a$. Since $f^{\prime}(b)=0$ and $f^{\prime \prime}(b)>0$, there is an interval $I$ containing $b$ such that for all $x$ in $I$, $f$ is decreasing if $x<b$ and $f$ is increasing if $x>b$. As a result, $f$ has a local minimum at $x=b$.

### Second Derivative Test

Suppose $f^{\prime}(c)=0, \, f^{\prime \prime}$ is continuous over an interval containing $c$.

1. If $f^{\prime \prime}(c)>0$, then $f$ has a local minimum at $c$.
2. If $f^{\prime \prime}(c)<0$, then $f$ has a local maximum at $c$.
3. If $f^{\prime \prime}(c)=0$, then the test is inconclusive.

Note that for case iii. when $f^{\prime \prime}(c)=0$, then $f$ may have a local maximum, local minimum, or neither at $c$. For example, the functions $f(x)=x^3$, $f(x)=x^4$, and $f(x)=−x^4$ all have critical points at $x=0$. In each case, the second derivative is zero at $x=0$. However, the function $f(x)=x^4$ has a local minimum at $x=0$ whereas the function $f(x)=−x^4$ has a local maximum at $x=0$ and the function $f(x)=x^3$ does not have a local extremum at $x=0$.

Let’s now look at how to use the second derivative test to determine whether $f$ has a local maximum or local minimum at a critical point $c$ where $f^{\prime}(c)=0$.

### Using the Second Derivative Test

Use the second derivative to find the location of all local extrema for $f(x)=x^5-5x^3$.

To apply the second derivative test, we first need to find critical points $c$ where $f^{\prime}(c)=0$. The derivative is $f^{\prime}(x)=5x^4-15x^2$. Therefore, $f^{\prime}(x)=5x^4-15x^2=5x^2(x^2-3)=0$ when $x=0,\pm \sqrt{3}$.

To determine whether $f$ has a local extrema at any of these points, we need to evaluate the sign of $f^{\prime \prime}$ at these points. The second derivative is

$f^{\prime \prime}(x)=20x^3-30x=10x(2x^2-3)$.

In the following table, we evaluate the second derivative at each of the critical points and use the second derivative test to determine whether $f$ has a local maximum or local minimum at any of these points.

$x$ $f^{\prime \prime}(x)$ Conclusion
$−\sqrt{3}$ $-30\sqrt{3}$ Local maximum
0 0 Second derivative test is inconclusive
$\sqrt{3}$ $30\sqrt{3}$ Local minimum

By the second derivative test, we conclude that $f$ has a local maximum at $x=−\sqrt{3}$ and $f$ has a local minimum at $x=\sqrt{3}$. The second derivative test is inconclusive at $x=0$. To determine whether $f$ has a local extrema at $x=0$, we apply the first derivative test. To evaluate the sign of $f^{\prime}(x)=5x^2(x^2-3)$ for $x \in (−\sqrt{3},0)$ and $x \in (0,\sqrt{3})$, let $x=-1$ and $x=1$ be the two test points. Since $f^{\prime}(-1)<0$ and $f^{\prime}(1)<0$, we conclude that $f$ is decreasing on both intervals and, therefore, $f$ does not have a local extrema at $x=0$ as shown in the following graph.

Figure 10. The function $f$ has a local maximum at $x=−\sqrt{3}$ and a local minimum at $x=\sqrt{3}$

Consider the function $f(x)=x^3-(\frac{3}{2})x^2-18x$. The points $c=3,-2$ satisfy $f^{\prime}(c)=0$. Use the second derivative test to determine whether $f$ has a local maximum or local minimum at those points.

$f$ has a local maximum at -2 and a local minimum at 3.

#### Hint

$f^{\prime \prime}(x)=6x-3$

We have now developed the tools we need to determine where a function is increasing and decreasing, as well as acquired an understanding of the basic shape of the graph. Next we discuss what happens to a function as $x \to \pm \infty$. At that point, we have enough tools to provide accurate graphs of a large variety of functions.

# Guidelines for Drawing the Graph of a Function

We now have enough analytical tools to draw graphs of a wide variety of algebraic and transcendental functions. Before showing how to graph specific functions, let’s look at a general strategy to use when graphing any function.

### Problem-Solving Strategy: Drawing the Graph of a Function

Given a function $f$ use the following steps to sketch a graph of $f$:

1. Determine the domain of the function.
2. Locate the $x$- and $y$-intercepts.
3. Evaluate $\underset{x\to \infty }{\lim}f(x)$ and $\underset{x\to −\infty }{\lim}f(x)$ to determine the end behavior. If either of these limits is a finite number $L$, then $y=L$ is a horizontal asymptote. If either of these limits is $\infty$ or $−\infty$, determine whether $f$ has an oblique asymptote. If $f$ is a rational function such that $f(x)=\frac{p(x)}{q(x)}$, where the degree of the numerator is greater than the degree of the denominator, then $f$ can be written as
$f(x)=\frac{p(x)}{q(x)}=g(x)+\frac{r(x)}{q(x)}$,
where the degree of $r(x)$ is less than the degree of $q(x)$. The values of $f(x)$ approach the values of $g(x)$ as $x\to \pm \infty$. If $g(x)$ is a linear function, it is known as an oblique asymptote.
4. Determine whether $f$ has any vertical asymptotes.
5. Calculate $f^{\prime}$. Find all critical points and determine the intervals where $f$ is increasing and where $f$ is decreasing. Determine whether $f$ has any local extrema.
6. Calculate $f^{\prime \prime}$. Determine the intervals where $f$ is concave up and where $f$ is concave down. Use this information to determine whether $f$ has any inflection points. The second derivative can also be used as an alternate means to determine or verify that $f$ has a local extremum at a critical point.

Now let’s use this strategy to graph several different functions. We start by graphing a polynomial function.

### Sketching a Graph of a Polynomial

Sketch a graph of $f(x)=(x-1)^2 (x+2)$.

Step 1. Since $f$ is a polynomial, the domain is the set of all real numbers.

Step 2. When $x=0, \, f(x)=2$. Therefore, the $y$-intercept is $(0,2)$. To find the $x$-intercepts, we need to solve the equation $(x-1)^2 (x+2)=0$, which gives us the $x$-intercepts $(1,0)$ and $(-2,0)$

Step 3. We need to evaluate the end behavior of $f$. As $x\to \infty$, $(x-1)^2 \to \infty$ and $(x+2)\to \infty$. Therefore, $\underset{x\to \infty }{\lim}f(x)=\infty$. As $x\to −\infty$, $(x-1)^2 \to \infty$ and $(x+2) \to −\infty$. Therefore, $\underset{x\to -\infty }{\lim}f(x)=−\infty$. To get even more information about the end behavior of $f$, we can multiply the factors of $f$. When doing so, we see that

$f(x)=(x-1)^2 (x+2)=x^3-3x+2$.

Since the leading term of $f$ is $x^3$, we conclude that $f$ behaves like $y=x^3$ as $x\to \pm \infty$.

Step 4. Since $f$ is a polynomial function, it does not have any vertical asymptotes.

Step 5. The first derivative of $f$ is

$f^{\prime}(x)=3x^2-3$.

Therefore, $f$ has two critical points: $x=1,-1$. Divide the interval $(−\infty ,\infty)$ into the three smaller intervals: $(−\infty ,-1)$, $(-1,1)$, and $(1,\infty )$. Then, choose test points $x=-2$, $x=0$, and $x=2$ from these intervals and evaluate the sign of $f^{\prime}(x)$ at each of these test points, as shown in the following table.

Interval Test Point Sign of Derivative $f^{\prime}(x)=3x^2-3=3(x-1)(x+1)$ Conclusion
$(−\infty ,-1)$ $x=-2$ $(+)(−)(−)=+$ $f$ is increasing.
$(-1,1)$ $x=0$ $(+)(−)(+)=−$ $f$ is decreasing.
$(1,\infty )$ $x=2$ $(+)(+)(+)=+$ $f$ is increasing.

From the table, we see that $f$ has a local maximum at $x=-1$ and a local minimum at $x=1$. Evaluating $f(x)$ at those two points, we find that the local maximum value is $f(-1)=4$ and the local minimum value is $f(1)=0$.

Step 6. The second derivative of $f$ is

$f^{\prime \prime}(x)=6x$.

The second derivative is zero at $x=0$. Therefore, to determine the concavity of $f$, divide the interval $(−\infty ,\infty)$ into the smaller intervals $(−\infty ,0)$ and $(0,\infty )$, and choose test points $x=-1$ and $x=1$ to determine the concavity of $f$ on each of these smaller intervals as shown in the following table.

Interval Test Point Sign of $f^{\prime \prime}(x)=6x$ Conclusion
$(−\infty ,0)$ $x=-1$ $-$ $f$ is concave down.
$(0,\infty )$ $x=1$ $+$ $f$ is concave up.

We note that the information in the preceding table confirms the fact, found in step 5, that $f$ has a local maximum at $x=-1$ and a local minimum at $x=1$. In addition, the information found in step 5—namely, $f$ has a local maximum at $x=-1$ and a local minimum at $x=1$, and $f^{\prime}(x)=0$ at those points—combined with the fact that $f^{\prime \prime}$ changes sign only at $x=0$ confirms the results found in step 6 on the concavity of $f$.

Combining this information, we arrive at the graph of $f(x)=(x-1)^2 (x+2)$ shown in the following graph.

Sketch a graph of $f(x)=(x-1)^3 (x+2)$.

#### Hint

$f$ is a fourth-degree polynomial.

### Sketching a Rational Function

Sketch the graph of $f(x)=\frac{x^2}{1-x^2}$.

Step 1. The function $f$ is defined as long as the denominator is not zero. Therefore, the domain is the set of all real numbers $x$ except $x=\pm 1$.

Step 2. Find the intercepts. If $x=0$, then $f(x)=0$, so 0 is an intercept. If $y=0$, then $\frac{x^2}{1-x^2}=0$, which implies $x=0$. Therefore, $(0,0)$ is the only intercept.

Step 3. Evaluate the limits at infinity. Since $f$ is a rational function, divide the numerator and denominator by the highest power in the denominator: $x^2$. We obtain

$\underset{x\to \pm \infty }{\lim}\frac{x^2}{1-x^2}=\underset{x\to \pm \infty }{\lim}\frac{1}{\frac{1}{x^2}-1}=-1$.

Therefore, $f$ has a horizontal asymptote of $y=-1$ as $x\to \infty$ and $x\to −\infty$.

Step 4. To determine whether $f$ has any vertical asymptotes, first check to see whether the denominator has any zeroes. We find the denominator is zero when $x=\pm 1$. To determine whether the lines $x=1$ or $x=-1$ are vertical asymptotes of $f$, evaluate $\underset{x\to 1}{\lim}f(x)$ and $\underset{x\to −1}{\lim}f(x)$. By looking at each one-sided limit as $x\to 1$, we see that

$\underset{x\to 1^+}{\lim}\frac{x^2}{1-x^2}=−\infty$ and $\underset{x\to 1^-}{\lim}\frac{x^2}{1-x^2}=\infty$.

In addition, by looking at each one-sided limit as $x\to −1$, we find that

$\underset{x\to −1^+}{\lim}\frac{x^2}{1-x^2}=\infty$ and $\underset{x\to −1^-}{\lim}\frac{x^2}{1-x^2}=−\infty$.

Step 5. Calculate the first derivative:

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

Critical points occur at points $x$ where $f^{\prime}(x)=0$ or $f^{\prime}(x)$ is undefined. We see that $f^{\prime}(x)=0$ when $x=0$. The derivative $f^{\prime}$ is not undefined at any point in the domain of $f$. However, $x=\pm 1$ are not in the domain of $f$. Therefore, to determine where $f$ is increasing and where $f$ is decreasing, divide the interval $(−\infty ,\infty )$ into four smaller intervals: $(−\infty ,-1)$, $(-1,0)$, $(0,1)$, and $(1,\infty )$, and choose a test point in each interval to determine the sign of $f^{\prime}(x)$ in each of these intervals. The values $x=-2$, $x=-\frac{1}{2}$, $x=\frac{1}{2}$, and $x=2$ are good choices for test points as shown in the following table.

Interval Test Point Sign of $f^{\prime}(x)=\frac{2x}{(1-x^2)^2}$ Conclusion
$(−\infty ,-1)$ $x=-2$ $−/+=−$ $f$ is decreasing.
$(-1,0)$ $x=-1/2$ $−/+=−$ $f$ is decreasing.
$(0,1)$ $x=1/2$ $+/+=+$ $f$ is increasing.
$(1,\infty )$ $x=2$ $+/+=+$ $f$ is increasing.

From this analysis, we conclude that $f$ has a local minimum at $x=0$ but no local maximum.

Step 6. Calculate the second derivative:

$\begin{array}{ll} f^{\prime \prime}(x) & =\frac{(1-x^2)^2(2)-2x(2(1-x^2)(-2x))}{(1-x^2)^4} \\ & =\frac{(1-x^2)[2(1-x^2)+8x^2]}{(1-x^2)^4} \\ & =\frac{2(1-x^2)+8x^2}{(1-x^2)^3} \\ & =\frac{6x^2+2}{(1-x^2)^3} \end{array}$

To determine the intervals where $f$ is concave up and where $f$ is concave down, we first need to find all points $x$ where $f^{\prime \prime}(x)=0$ or $f^{\prime \prime}(x)$ is undefined. Since the numerator $6x^2+2 \ne 0$ for any $x$, $f^{\prime \prime}(x)$ is never zero. Furthermore, $f^{\prime \prime}$ is not undefined for any $x$ in the domain of $f$. However, as discussed earlier, $x=\pm 1$ are not in the domain of $f$. Therefore, to determine the concavity of $f$, we divide the interval $(−\infty ,\infty )$ into the three smaller intervals $(−\infty ,-1)$, $(-1,-1)$, and $(1,\infty )$, and choose a test point in each of these intervals to evaluate the sign of $f^{\prime \prime}(x)$ in each of these intervals. The values $x=-2$, $x=0$, and $x=2$ are possible test points as shown in the following table.

Interval Test Point Sign of $f^{\prime \prime}(x)=\frac{6x^2+2}{(1-x^2)^3}$ Conclusion
$(−\infty ,-1)$ $x=-2$ $+/-=−$ $f$ is concave down.
$(-1,-1)$ $x=0$ $+/+=+$ $f$ is concave up.
$(1,\infty )$ $x=2$ $+/-=−$ $f$ is concave down.

Combining all this information, we arrive at the graph of $f$ shown below. Note that, although $f$ changes concavity at $x=-1$ and $x=1$, there are no inflection points at either of these places because $f$ is not continuous at $x=-1$ or $x=1$.

Sketch a graph of $f(x)=\frac{3x+5}{8+4x}$.

#### Hint

A line $y=L$ is a horizontal asymptote of $f$ if the limit as $x\to \infty$ or the limit as $x\to −\infty$ of $f(x)$ is $L$. A line $x=a$ is a vertical asymptote if at least one of the one-sided limits of $f$ as $x\to a$ is $\infty$ or $−\infty$.

### Sketching a Rational Function with an Oblique Asymptote

Sketch the graph of $f(x)=\frac{x^2}{x-1}$

Step 1. The domain of $f$ is the set of all real numbers $x$ except $x=1$.

Step 2. Find the intercepts. We can see that when $x=0$, $f(x)=0$, so $(0,0)$ is the only intercept.

Step 3. Evaluate the limits at infinity. Since the degree of the numerator is one more than the degree of the denominator, $f$ must have an oblique asymptote. To find the oblique asymptote, use long division of polynomials to write

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

Since $1/(x-1)\to 0$ as $x\to \pm \infty$, $f(x)$ approaches the line $y=x+1$ as $x\to \pm \infty$. The line $y=x+1$ is an oblique asymptote for $f$.

Step 4. To check for vertical asymptotes, look at where the denominator is zero. Here the denominator is zero at $x=1$. Looking at both one-sided limits as $x\to 1$, we find

$\underset{x\to 1^+}{\lim}\frac{x^2}{x-1}=\infty$ and $\underset{x\to 1^-}{\lim}\frac{x^2}{x-1}=−\infty$.

Therefore, $x=1$ is a vertical asymptote, and we have determined the behavior of $f$ as $x$ approaches 1 from the right and the left.

Step 5. Calculate the first derivative:

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

We have $f^{\prime}(x)=0$ when $x^2-2x=x(x-2)=0$. Therefore, $x=0$ and $x=2$ are critical points. Since $f$ is undefined at $x=1$, we need to divide the interval $(−\infty ,\infty )$ into the smaller intervals $(−\infty ,0)$, $(0,1)$, $(1,2)$, and $(2,\infty )$, and choose a test point from each interval to evaluate the sign of $f^{\prime}(x)$ in each of these smaller intervals. For example, let $x=-1$, $x=\frac{1}{2}$, $x=\frac{3}{2}$, and $x=3$ be the test points as shown in the following table.

Interval Test Point Sign of $f^{\prime}(x)=\frac{x^2-2x}{(x-1)^2}=\frac{x(x-2)}{(x-1)^2}$ Conclusion
$(−\infty ,0)$ $x=-1$ $(−)(−)/+=+$ $f$ is increasing.
$(0,1)$ $x=1/2$ $(+)(−)/+=−$ $f$ is decreasing.
$(1,2)$ $x=3/2$ $(+)(−)/+=−$ $f$ is decreasing.
$(2,\infty )$ $x=3$ $(+)(+)/+=+$ $f$ is increasing.

From this table, we see that $f$ has a local maximum at $x=0$ and a local minimum at $x=2$. The value of $f$ at the local maximum is $f(0)=0$ and the value of $f$ at the local minimum is $f(2)=4$. Therefore, $(0,0)$ and $(2,4)$ are important points on the graph.

Step 6. Calculate the second derivative:

$\begin{array}{ll} f^{\prime \prime}(x) & =\frac{(x-1)^2(2x-2)-(x^2-2x)(2(x-1))}{(x-1)^4} \\ & =\frac{(x-1)[(x-1)(2x-2)-2(x^2-2x)]}{(x-1)^4} \\ & =\frac{(x-1)(2x-2)-2(x^2-2x)}{(x-1)^3} \\ & =\frac{2x^2-4x+2-(2x^2-4x)}{(x-1)^3} \\ & =\frac{2}{(x-1)^3} \end{array}$

We see that $f^{\prime \prime}(x)$ is never zero or undefined for $x$ in the domain of $f$. Since $f$ is undefined at $x=1$, to check concavity we just divide the interval $(−\infty ,\infty )$ into the two smaller intervals $(−\infty ,1)$ and $(1,\infty )$, and choose a test point from each interval to evaluate the sign of $f^{\prime \prime}(x)$ in each of these intervals. The values $x=0$ and $x=2$ are possible test points as shown in the following table.

Interval Test Point Sign of $f^{\prime \prime}(x)=\frac{2}{(x-1)^3}$ Conclusion
$(−\infty ,1)$ $x=0$ $+/-=−$ $f$ is concave down.
$(1,\infty )$ $x=2$ $+/+=+$ $f$ is concave up.

From the information gathered, we arrive at the following graph for $f.$

Find the oblique asymptote for $f(x)=\frac{3x^3-2x+1}{2x^2-4}$.

$y=\frac{3}{2}x$

#### Hint

Use long division of polynomials.

### Sketching the Graph of a Function with a Cusp

Sketch a graph of $f(x)=(x-1)^{2/3}$.

Step 1. Since the cube-root function is defined for all real numbers $x$ and $(x-1)^{2/3}=(\sqrt[3]{x-1})^2$, the domain of $f$ is all real numbers.

Step 2: To find the $y$-intercept, evaluate $f(0)$. Since $f(0)=1$, the $y$-intercept is $(0,1)$. To find the $x$-intercept, solve $(x-1)^{2/3}=0$. The solution of this equation is $x=1$, so the $x$-intercept is $(1,0)$.

Step 3: Since $\underset{x\to \pm \infty }{\lim}(x-1)^{2/3}=\infty$, the function continues to grow without bound as $x\to \infty$ and $x\to −\infty$.

Step 4: The function has no vertical asymptotes.

Step 5: To determine where $f$ is increasing or decreasing, calculate $f^{\prime}$. We find

$f^{\prime}(x)=\frac{2}{3}(x-1)^{-1/3}=\frac{2}{3(x-1)^{1/3}}$.

This function is not zero anywhere, but it is undefined when $x=1$. Therefore, the only critical point is $x=1$. Divide the interval $(−\infty ,\infty )$ into the smaller intervals $(−\infty ,1)$ and $(1,\infty )$, and choose test points in each of these intervals to determine the sign of $f^{\prime}(x)$ in each of these smaller intervals. Let $x=0$ and $x=2$ be the test points as shown in the following table.

Interval Test Point Sign of $f^{\prime}(x)=\frac{2}{3(x-1)^{1/3}}$ Conclusion
$(−\infty ,1)$ $x=0$ $+/-=−$ $f$ is decreasing.
$(1,\infty )$ $x=2$ $+/+=+$ $f$ is increasing.

We conclude that $f$ has a local minimum at $x=1$. Evaluating $f$ at $x=1$, we find that the value of $f$ at the local minimum is zero. Note that $f^{\prime}(1)$ is undefined, so to determine the behavior of the function at this critical point, we need to examine $\underset{x\to 1}{\lim}f^{\prime}(x)$. Looking at the one-sided limits, we have

$\underset{x\to 1^+}{\lim}\frac{2}{3(x-1)^{1/3}}=\infty$ and $\underset{x\to 1^-}{\lim}\frac{2}{3(x-1)^{1/3}}=−\infty$.

Therefore, $f$ has a cusp at $x=1$.

Step 6: To determine concavity, we calculate the second derivative of $f$:

$f^{\prime \prime}(x)=-\frac{2}{9}(x-1)^{-4/3}=\frac{-2}{9(x-1)^{4/3}}$.

We find that $f^{\prime \prime}(x)$ is defined for all $x$, but is undefined when $x=1$. Therefore, divide the interval $(−\infty ,\infty )$ into the smaller intervals $(−\infty ,1)$ and $(1,\infty )$, and choose test points to evaluate the sign of $f^{\prime \prime}(x)$ in each of these intervals. As we did earlier, let $x=0$ and $x=2$ be test points as shown in the following table.

Interval Test Point Sign of $f^{\prime \prime}(x)=\frac{-2}{9(x-1)^{4/3}}$ Conclusion
$(−\infty ,1)$ $x=0$ $−/+=−$ $f$ is concave down.
$(1,\infty )$ $x=2$ $−/+=−$ $f$ is concave down.

From this table, we conclude that $f$ is concave down everywhere. Combining all of this information, we arrive at the following graph for $f$.

Consider the function $f(x)=5-x^{2/3}$. Determine the point on the graph where a cusp is located. Determine the end behavior of $f$.

The function $f$ has a cusp at $(0,5)$: $\underset{x\to 0^-}{\lim}f^{\prime}(x)=\infty$, $\underset{x\to 0^+}{\lim}f^{\prime}(x)=−\infty$. For end behavior, $\underset{x\to \pm \infty }{\lim}f(x)=−\infty$.

#### Hint

A function $f$ has a cusp at a point $a$ if $f(a)$ exists, $f^{\prime}(a)$ is undefined, one of the one-sided limits as $x\to a$ of $f^{\prime}(x)$ is $+\infty$, and the other one-sided limit is $−\infty$.

### Key Concepts

• If $f^{\prime \prime}(x)>0$ over an interval $I$, then $f$ is concave up over $I$.
• If $f^{\prime \prime}(x)<0$ over an interval $I$, then $f$ is concave down over $I$.
• If $f^{\prime}(c)=0$ and $f^{\prime \prime}(c)>0$, then $f$ has a local minimum at $c$.
• If $f^{\prime}(c)=0$ and $f^{\prime \prime}(c)<0$, then $f$ has a local maximum at $c$.
• If $f^{\prime}(c)=0$ and $f^{\prime \prime}(c)=0$, then evaluate $f^{\prime}(x)$ at a test point $x$ to the left of $c$ and a test point $x$ to the right of $c$, to determine whether $f$ has a local extremum at $c$.
• For a polynomial function $p(x)=a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0$, where $a_n \ne 0$, the end behavior is determined by the leading term $a_n x^n$. If $n\ne 0$, $p(x)$ approaches $\infty$ or $−\infty$ at each end.
• For a rational function $f(x)=\frac{p(x)}{q(x)}$, the end behavior is determined by the relationship between the degree of $p$ and the degree of $q$. If the degree of $p$ is less than the degree of $q$, the line $y=0$ is a horizontal asymptote for $f$. If the degree of $p$ is equal to the degree of $q$, then the line $y=\frac{a_n}{b_n}$ is a horizontal asymptote, where $a_n$ and $b_n$ are the leading coefficients of $p$ and $q$, respectively. If the degree of $p$ is greater than the degree of $q$, then $f$ approaches $\infty$ or $−\infty$ at each end.

2. For the function $y=x^3$, is $x=0$ both an inflection point and a local maximum/minimum?

It is not a local maximum/minimum because $f^{\prime}$ does not change sign

3. For the function $y=x^3$, is $x=0$ an inflection point?

4. Is it possible for a point $c$ to be both an inflection point and a local extrema of a twice differentiable function?

No

5. Why do you need continuity for the first derivative test? Come up with an example.

6. Explain whether a concave-down function has to cross $y=0$ for some value of $x$.

False; for example, $y=\sqrt{x}$.

7. Explain whether a polynomial of degree 2 can have an inflection point.

For the following exercises, analyze the graphs of $f^{\prime}$, then list all inflection points and intervals $f$ that are concave up and concave down.

18.

Concave up on all $x$, no inflection points

19.
20.

Answer: Concave up on all $x$, no inflection points

21.
22.

Concave up for $x<0$ and $x>1$, concave down for $0<x<1$, inflection points at $x=0$ and $x=1$

For the following exercises, draw a graph that satisfies the given specifications for the domain $x=[-3,3]$. The function does not have to be continuous or differentiable.

23. $f(x)>0, \, f^{\prime}(x)>0$ over $x>1, \, -3<x<0, \, f^{\prime}(x)=0$ over $0<x<1$

24. $f^{\prime}(x)>0$ over $x>2, \, -3<x<-1, \, f^{\prime}(x)<0$ over $-1<x<2, \, f^{\prime \prime}(x)<0$ for all $x$

25. $f^{\prime \prime}(x)<0$ over $-1<x<1, \, f^{\prime \prime}(x)>0, \, -3<x<-1, \, 1<x<3$, local maximum at $x=0$, local minima at $x=\pm 2$

26. There is a local maximum at $x=2$, local minimum at $x=1$, and the graph is neither concave up nor concave down.

27. There are local maxima at $x=\pm 1$, the function is concave up for all $x$, and the function remains positive for all $x$.

For the following exercise, determine a. intervals where $f$ is concave up or concave down, and b. the inflection points of $f$.

30. $f(x)=x^3-4x^2+x+2$

a. Concave up for $x>\frac{4}{3}$, concave down for $x<\frac{4}{3}$ b. Inflection point at $x=\frac{4}{3}$

For the following exercises, determine

1. intervals where $f$ is increasing or decreasing,
2. local minima and maxima of $f$,
3. intervals where $f$ is concave up and concave down, and
4. the inflection points of $f$.

31. $f(x)=x^2-6x$

32. $f(x)=x^3-6x^2$

a. Increasing over $x<0$ and $x>4$, decreasing over $0<x<4$ b. Maximum at $x=0$, minimum at $x=4$ c. Concave up for $x>2$, concave down for $x<2$ d. Infection point at $x=2$

33. $f(x)=x^4-6x^3$

34. $f(x)=x^{11}-6x^{10}$

a. Increasing over $x<0$ and $x>\frac{60}{11}$, decreasing over $0<x<\frac{60}{11}$ b. Minimum at $x=\frac{60}{11}$ c. Concave down for $x<\frac{54}{11}$, concave up for $x>\frac{54}{11}$ d. Inflection point at $x=\frac{54}{11}$

35. $f(x)=x+x^2-x^3$

36. $f(x)=x^2+x+1$

a. Increasing over $x>-\frac{1}{2}$, decreasing over $x<-\frac{1}{2}$ b. Minimum at $x=-\frac{1}{2}$ c. Concave up for all $x$ d. No inflection points

37. $f(x)=x^3+x^4$

For the following exercises, determine

1. intervals where $f$ is increasing or decreasing,
2. local minima and maxima of $f$,
3. intervals where $f$ is concave up and concave down, and
4. the inflection points of $f$. Sketch the curve, then use a calculator to compare your answer. If you cannot determine the exact answer analytically, use a calculator.

38. [T] $f(x)= \sin (\pi x)- \cos (\pi x)$ over $x=[-1,1]$

a. Increases over $-\frac{1}{4}<x<\frac{3}{4}$, decreases over $x>\frac{3}{4}$ and $x<-\frac{1}{4}$ b. Minimum at $x=-\frac{1}{4}$, maximum at $x=\frac{3}{4}$ c. Concave up for $-\frac{3}{4}<x<\frac{1}{4}$, concave down for $x<-\frac{3}{4}$ and $x>\frac{1}{4}$ d. Inflection points at $x=-\frac{3}{4}, \, x=\frac{1}{4}$

39. [T] $f(x)=x + \sin (2x)$ over $x=[-\frac{\pi }{2},\frac{\pi }{2}]$

40. [T] $f(x)= \sin x+ \tan x$ over $(-\frac{\pi }{2},\frac{\pi }{2})$

a. Increasing for all $x$ b. No local minimum or maximum c. Concave up for $x>0$, concave down for $x<0$ d. Inflection point at $x=0$

41. [T] $f(x)=(x-2)^2 (x-4)^2$

42. [T] $f(x)=\frac{1}{1-x}, \, x \ne 1$

a. Increasing for all $x$ where defined b. No local minima or maxima c. Concave up for $x<1$, concave down for $x>1$ d. No inflection points in domain

43. [T] $f(x)=\frac{\sin x}{x}$ over $x=[-2\pi ,0) \cup (0,2\pi]$

44. $f(x)= \sin x e^x$ over $x=[−\pi ,\pi]$

a. Increasing over $-\frac{\pi }{4}<x<\frac{3\pi }{4}$, decreasing over $x>\frac{3\pi }{4}, \, x<-\frac{\pi }{4}$ b. Minimum at $x=-\frac{\pi }{4}$, maximum at $x=\frac{3\pi }{4}$ c. Concave up for $-\frac{\pi }{2}<x<\frac{\pi }{2}$, concave down for $x<-\frac{\pi }{2}, \, x>\frac{\pi }{2}$ d. Infection points at $x=\pm \frac{\pi }{2}$

45. $f(x)=\ln x \sqrt{x}, \, x>0$

46. $f(x)=\frac{1}{4}\sqrt{x}+\frac{1}{x}, \, x>0$

a. Increasing over $x>4$, decreasing over $0<x<4$ b. Minimum at $x=4$ c. Concave up for $0<x<8\sqrt[3]{2}$, concave down for $x>8\sqrt[3]{2}$ d. Inflection point at $x=8\sqrt[3]{2}$

47. $f(x)=\frac{e^x}{x}, \, x\ne 0$

For the following exercises, examine the graphs. Identify where the vertical asymptotes are located.

1.

$x=1$

2.
3.

$x=-1, \, x=2$

4.
5.

$x=0$

For the following functions $f(x)$, determine whether there is an asymptote at $x=a$. Justify your answer without graphing on a calculator.

6. $f(x)=\frac{x+1}{x^2+5x+4}, \, a=-1$

7. $f(x)=\frac{x}{x-2}, \, a=2$

Yes, there is a vertical asymptote

8. $f(x)=(x+2)^{3/2}, \, a=-2$

9. $f(x)=(x-1)^{-1/3}, \, a=1$

Yes, there is a vertical asymptote

10. $f(x)=1+x^{-2/5}, \, a=1$

For the following exercises, construct a function $f(x)$ that has the given asymptotes.

11. $x=1$ and $y=2$

Answers will vary, for example: $y=\frac{2x}{x-1}$

12. $x=1$ and $y=0$

13. $y=4$ and $x=-1$

Answers will vary, for example: $y=\frac{4x}{x+1}$

14. $x=0$

For the following exercises, graph the function on a graphing calculator on the window $x=[-5,5]$ and estimate the horizontal asymptote or limit. Then, calculate the actual horizontal asymptote or limit.

15. [T] $f(x)=\frac{1}{x+10}$

$y=0$

16. [T] $f(x)=\frac{x+1}{x^2+7x+6}$

17. [T] $\underset{x\to −\infty }{\lim} x^2+10x+25$

$\infty$

18. [T] $\underset{x\to −\infty }{\lim}\frac{x+2}{x^2+7x+6}$

19. [T] $\underset{x\to \infty }{\lim}\frac{3x+2}{x+5}$

$y=3$

For the following exercises, draw a graph of the functions without using a calculator. Be sure to notice all important features of the graph: local maxima and minima, inflection points, and asymptotic behavior.

20. $y=3x^2+2x+4$

21. $y=x^3-3x^2+4$

22. $y=\frac{2x+1}{x^2+6x+5}$

23. $y=\frac{x^3+4x^2+3x}{3x+9}$

24. $y=\frac{x^2+x-2}{x^2-3x-4}$

25. $y=\sqrt{x^2-5x+4}$

26. $y=2x\sqrt{16-x^2}$

27. $y=\frac{ \cos x}{x}$, on $x=[-2\pi ,2\pi]$

28. $y=e^x-x^3$

29. $y=x \tan x, \, x=[−\pi ,\pi]$

30. $y=x \ln (x), \, x>0$

31. $y=x^2 \sin (x), \, x=[-2\pi ,2\pi]$

32. For $f(x)=\frac{P(x)}{Q(x)}$ to have an asymptote at $y=2$ then the polynomials $P(x)$ and $Q(x)$ must have what relation?

33. For $f(x)=\frac{P(x)}{Q(x)}$ to have an asymptote at $x=0$, then the polynomials $P(x)$ and $Q(x)$ must have what relation?

$Q(x)$ must have have $x^{k+1}$ as a factor, where $P(x)$ has $x^k$ as a factor.

34. If $f^{\prime}(x)$ has asymptotes at $y=3$ and $x=1$, then $f(x)$ has what asymptotes?

35. Both $f(x)=\frac{1}{x-1}$ and $g(x)=\frac{1}{(x-1)^2}$ have asymptotes at $x=1$ and $y=0$. What is the most obvious difference between these two functions?

$\underset{x\to 1^-}{\lim} f(x)$ and $\underset{x\to 1^-}{\lim} g(x)$

36. True or false: Every ratio of polynomials has vertical asymptotes.

## Glossary

end behavior
the behavior of a function as $x\to \infty$ and $x\to −\infty$
horizontal asymptote
if $\underset{x\to \infty }{\lim}f(x)=L$ or $\underset{x\to −\infty }{\lim}f(x)=L$, then $y=L$ is a horizontal asymptote of $f$
infinite limit at infinity
a function that becomes arbitrarily large as $x$ becomes large
limit at infinity
the limiting value, if it exists, of a function as $x\to \infty$ or $x\to −\infty$
oblique asymptote
the line $y=mx+b$ if $f(x)$ approaches it as $x\to \infty$ or $x\to −\infty$

### Key Concepts

• If $c$ is a critical point of $f$ and $f^{\prime}(x)>0$ for $x<c$ and $f^{\prime}(x)<0$ for $x>c$, then $f$ has a local maximum at $c$.
• If $c$ is a critical point of $f$ and $f^{\prime}(x)<0$ for $x<c$ and $f^{\prime}(x)>0$ for $x>c$, then $f$ has a local minimum at $c$.
• If $f^{\prime \prime}(x)>0$ over an interval $I$, then $f$ is concave up over $I$.
• If $f^{\prime \prime}(x)<0$ over an interval $I$, then $f$ is concave down over $I$.
• If $f^{\prime}(c)=0$ and $f^{\prime \prime}(c)>0$, then $f$ has a local minimum at $c$.
• If $f^{\prime}(c)=0$ and $f^{\prime \prime}(c)<0$, then $f$ has a local maximum at $c$.
• If $f^{\prime}(c)=0$ and $f^{\prime \prime}(c)=0$, then evaluate $f^{\prime}(x)$ at a test point $x$ to the left of $c$ and a test point $x$ to the right of $c$, to determine whether $f$ has a local extremum at $c$.