# Curve Sketching

This section covers:

Curve sketching is not my favorite subject in Calculus, since it’s so abstract, but it’s useful to be able to look at functions and their characteristics by simply taking derivatives and thinking about the functions.

Before we get into curve sketching, let’s talk about two theorems that seems sort of useless, but we need to go over them nonetheless.

# Extreme Value Theorem, Rolle’s Theorem, and Mean Value Theorem

To sketch curves in Calculus, we’ll be looking at minimums and maximums of functions in certain intervals, so we have to talk about a few theorems that seem very obvious, but we need to understand. We’ll need these theorems to know that if a function is differentiable and the derivative at a certain point is 0, then that point is either a minimum or maximum. Thus, before you to get to actual curve sketching, you’ll probably see some problems as in this section.

### Extreme Value Theorem

The Extreme Value Theorem states that a function on a closed interval must have both a minimum and maximum in that interval. (A closed interval is an interval that includes its endpoints, or the points at the very beginning and end of the interval). If we didn’t include the endpoints (an open interval), we may never have a minimum or maximum, since we could have a function that gets closer and closer to a point but never touches it (like we saw with Limits). When we do include these endpoints, there will definitely be a minimum or maximum; for example, if the function is increasing for the whole interval, for example, the minimum and maximum would be at these endpoints.

### Rolle’s Theorem

Rolle’s Theorem states that if the function in an interval comes up and back down (or down and back up) and ends up exactly where it started in an open interval (one where endpoints aren’t defined), you’ll have at least one maximum or minimum (where the derivative is 0). Here is the formal form of Rolle’s Theorem:

Rolle’s Theorem:

If a function is continuous on a closed interval $$[a,b]$$ and differentiable on the open interval $$(a,b)$$, and $$f\left( a \right)=f\left( b \right)$$ (the $$y$$’s on the endpoints are the same), then there is at least one number $$c$$ in $$(a,b)$$, where $${f}’\left( c \right)=0$$.

Note that if this function was not differentiable, you would still have either a maximum or minimum, but you may not be able to take the derivative at that point (so you may have a sharp turn instead of a nice curve at that point).

Here are pictures of a differentiable and non-differentiable functions. For the differentiable graph, do you see how if the graph goes up and comes back down, we have to have at least one point where the derivative is 0 (at the maximum)? <

### Mean Value Theorem

Note that the Mean Value Theorem for Integrals can be found here in the Definite Integration section.

<

The Mean Value Theorem is a little bit more important and in fact is proven using Rolle’s theorem. It says that somewhere inside a closed interval $$[a,b]$$ there exists a point $$c$$ where the derivative at this point is the same as the slope between points $$a$$ and $$b$$. Think of the Mean Value Theorem as Rolle’s Theorem, but possibly “tilted”.

Here’s the formal form of the Mean Value Theorem and a picture; in this example, the slope of the tangent line is 1, and also the derivative at the point $$\boldsymbol {(2,3)}$$ is also 1. We’ll see more examples below. Here are some problems that you might see with these theorems:

 Problem Solution For which of the following graphs does Rolle’s Theorem apply for the interval $$[a,b]$$?  a)  Does not apply, since the function is not differentiable everywhere on $$\left( {a,\,\,b} \right)$$.   b)  Does apply, since the function is continuous and differentiable on $$[a,b]$$.   c)  Does not apply since the function is not continuous on $$[a,b]$$.   d)  Does not apply since $$f\left( a \right)\ne f\left( b \right)$$. For which of the following functions does the Mean Value Theorem apply for $$[-1,1]$$?   a)  $$y=\sqrt{x}$$       b)  $$y=\left| {x+2} \right|$$      c)  $$y=\frac{1}{x}$$ a)  Does not apply, since the function is not differentiable (has a vertical tangent) at $$x=0$$.   b)  Does apply, since the function is continuous and differentiable on the interval. Note that the function is not differentiable at $$x=-2$$, but this is not in the interval $$[-1,1]$$.   c)  Does not apply since the function is not continuous on $$[-1,1]$$ (vertical asymptote at  $$x=0$$).

Here are a few more typical Mean Value Theorem (MVT) problems. Note that when we get our value of $$\boldsymbol {c}$$, we have to make sure it lies in the interval we’re given.

Note also that these problems may be worded something like this: For what value of $$c$$ on a certain open interval would the tangent to the graph of a certain function be parallel to the secant line in that closed interval?

 Mean Value Theorem Problem Solution Assume that the function $$f\left( x \right)=4x-\sqrt{x}$$ satisfies the Mean Value Theorem on the interval $$[0,4]$$.   Find the value of “$$c$$” that is guaranteed by the theorem.  First make sure the MVT applies. The function is continuous on closed interval $$[0,4]$$ and differentiable on the open interval $$(0,4)$$; therefore, the MVT applies. Find the slope: $$\displaystyle \frac{{f\left( a \right)-f\left( b \right)}}{{b-a}}=\frac{{f\left( 4 \right)-f\left( 0 \right)}}{{4-0}}=\frac{{\left( {4\left( 4 \right)-\sqrt{4}} \right)-\left( {4\left( 0 \right)-\sqrt{0}} \right)}}{{4-0}}=\frac{{14}}{4}=\frac{7}{2}$$ Find the derivative: since $$f\left( x \right)=4x-{{x}^{{\frac{1}{2}}}}$$, $$\displaystyle {f}’\left( x \right)=4-\frac{1}{2}{{x}^{{-\frac{1}{2}}}}$$.   By the MVT, $$\displaystyle {f}’\left( x \right)=4-\frac{1}{2}{{x}^{{-\frac{1}{2}}}}$$, so we need to find $$c$$ where $$\displaystyle 4-\frac{1}{2}{{c}^{{-\frac{1}{2}}}}=\frac{7}{2}$$: $$\displaystyle 4-\frac{1}{2}{{c}^{{-\frac{1}{2}}}}=\frac{7}{2};\,\,\,\,\frac{1}{2}{{c}^{{-\frac{1}{2}}}}=4-\frac{7}{2};\,\,\,\,\,{{c}^{{-\frac{1}{2}}}}=\frac{1}{2}\cdot 2;\,\,\,c={{1}^{{-2}}}=1$$.   This value lies in the interval $$[0,4]$$, so the value of $$c$$ that is guaranteed by the MVT is $$c=1$$. Does the function $$f\left( x \right)={{x}^{3}}-4{{x}^{2}}+2x$$ satisfy the Mean Value Theorem on the interval $$[0,2]$$?   Justify answer and then find the value of “$$c$$” guaranteed by the theorem.  First make sure the MVT applies. The function is continuous on closed interval $$[0,2]$$ and differentiable on the open interval $$(0,2)$$; therefore, the MVT applies. Find the slope: Since \begin{align}\frac{{f\left( a \right)-f\left( b \right)}}{{b-a}}&=\frac{{f\left( 2 \right)-f\left( 0 \right)}}{{2-\left( 0 \right)}}=\frac{{\left( {{{{\left( 2 \right)}}^{3}}-4{{{\left( 2 \right)}}^{2}}+2\left( 2 \right)} \right)-\left( {{{{\left( 0 \right)}}^{3}}-4{{{\left( 0 \right)}}^{2}}+2\left( 0 \right)} \right)}}{2}\\&=\frac{{-4-\left( 0 \right)}}{2}=-2\end{align}, . Find the derivative: since $$f\left( x \right)={{x}^{3}}-4{{x}^{2}}+2x$$, $${f}’\left( x \right)=3{{x}^{2}}-8x+2$$.   By the MVT, $${f}’\left( c \right)=-2$$, so we need to find $$c$$ where $$3{{c}^{2}}-8c+2=-2$$. $$\displaystyle 3{{c}^{2}}-8c+2=-2;\,\,\,\,3{{c}^{2}}-8c+4=0;\,\,\,\,\,\left( {3c-2} \right)\left( {c-2} \right)=0;\,\,\,c=\frac{2}{3},\,\,2$$   Now we need to check to make sure the value(s) we got lie in the interval $$[0,2]$$. Since only $$\displaystyle c=\frac{2}{3}$$ lies in the interval, the only value of $$c$$ that is guaranteed by the MVT is $$\displaystyle c=\frac{2}{3}$$. Does the function $$\displaystyle f\left( x \right)=\frac{1}{{x-2}}$$ satisfy the Mean Value Theorem on the interval $$[1,4]$$?   Justify answer and then find the value of “$$c$$” guaranteed by the theorem.  Since the function is not continuous (nor totally differentiable) in the interval $$[1,4]$$, the MVT does not apply.

# Relative Extrema and the First Derivative Test

## Extrema and Critical Numbers

We first talked about Extrema of Functions in the Advanced Functions section hereExtrema is just a fancy word for finding the lowest (minimum) or highest (maximum) $$\boldsymbol {y}$$ value in a function or interval of a function; we will use Extrema to find Critical Numbers.

We can talk about absolute extrema, or relative (local) extrema. Think of the absolute extrema as the absolute lowest or highest point in the whole domain of the function, and the relative (local) extrema as the lowest or highest for a part of the graph. Technically, relative extrema must be the minimum or maximum of a point from both sides of $$x$$, so they can’t be endpoints; they are just “valleys” or “hills”. Note that not every function has a lowest (minimum) or highest (maximum) point in an interval or even the whole domain (like the function $$y=x$$), so there may not be any extrema.

The endpoints of a function may be the lowest or highest points (thus the absolute, not relative extrema); these are called the endpoint extrema.

Here is a graph that shows some examples of absolute/relative extrema; note also the endpoint extrema points:

< When we find the minimum and maximum values in an interval, we can use this information to find where a function is decreasing and increasing, since at a minimum or maximum value, the function takes a turn from “down to up” or “up to down”.

Critical numbers or critical points exist where a function has a minimum or maximum, whether or not the function is differentiable at that point. And it turns out that if a function is differentiable at a certain point, and that point is a minimum or maximum, the derivative at that point is 0.

Here is the formal definition of a critical number:

Let $$f$$ be defined at point $$c$$. If $${f}’\left( c \right)=0$$, or if $$f$$ is not differentiable at point $$c$$, then $$c$$ is a critical number of $$f$$.

## Increasing and Decreasing Functions, and the First Derivative Test

We talked about critical points (critical numbers) of a function (minimums or maximums), where the first derivative is 0 (or not defined). Now let’s talk about the derivative when the function is increasing (going upward from left to right), or decreasing (going downward from left to right).

When a function is increasing, the derivative is positive. When a function is decreasing, the derivative is negative. This makes perfect sense, since the derivative is a slope. When a function is going upwards from left to right (increasing), its slope is positive, and when a function is going downwards from left to right (decreasing), its slope is negative. (And when a function is constant, or staying the same, its derivative is 0).

Let’s talk about the guidelines for finding intervals for which a function is increasing or decreasing:

For a function $$f$$ that is continuous on interval $$[a,b]$$ and differentiable on interval $$(a,b)$$, to find the intervals for which $$f$$ is increasing or decreasing:

1. Find the critical points in $$(a,b)$$, and use these numbers to find test intervals.
2. For each of these test intervals, find the sign of the derivative at one test value.
3. If $${f}’\left( x \right)>0$$, then $$f$$ is increasing on $$[a,b]$$, if $${f}’\left( x \right)<0$$, then $$f$$ is decreasing on $$[a,b]$$, and if $${f}’\left( x \right)=0$$, then $$f$$ is constant on $$[a,b]$$.

And, based on these guidelines, here is the First Derivative Test, which allows us to find relative minimums and maximums (also known as local minimums and local maximums).

First Derivative Test

Assume that $$c$$ is a critical number of a function that is continuous on an open interval, and $$f$$ is differentiable on the interval, except possibly at $$c$$.

1. If  $${f}’\left( x \right)$$  changes from negative to positive at critical point $$x=c$$, then $$f$$ has a relative minimum at $$x=c$$.
2. If  $${f}’\left( x \right)$$  changes from positive to negative at critical point $$x=c$$, then $$f$$ has a relative maximum at $$x=c$$.
3. If  $${f}’\left( x \right)$$  is positive on both sides of $$x=c$$, or negative on both sides of $$x=c$$, then that point is neither a relative minimum or relative maximum.

Let’s think about why this makes sense. If we have a point where a function goes from falling to rising (negative to positive slope), that point would be a minimum. Similarly, if we have a point where a function goes from rising to falling (positive to negative slope), that point would be a maximum: Let’s do some problems; notice that we are using sign charts to determine the intervals that the function is decreasing or increasing. Note that sometimes we need to use values that aren’t even in the domain of the function (like in vertical asymptotes) in the sign charts; theoretically, these aren’t critical numbers, since they don’t exist in the original function.

 First Derivative Test Problem and Graph Solution Find the critical numbers, if any, and find the open interval(s) where the function is decreasing or increasing. Use the First Derivative Test to identify all relative extrema. $$f\left( x \right)={{x}^{2}}-8x$$  First take the derivative of the function to find possible critical values: $$f\left( x \right)={{x}^{2}}-8x;\,\,\,\,{f}’\left( x \right)=2x-8$$. $$2x-8=0;\,\,\,\,x=4$$; thus, 4 is a critical value. Create sign chart by testing intervals, using the derivative. Test the value “0” to see that $$2\left( 0 \right)-8$$ is negative, and test the value “5” to see that $$2\left( 5 \right)-8$$ is positive:  The function is decreasing in the interval $$\left( {-\infty ,4} \right)$$ and increasing in the interval $$\left( {4,\infty } \right)$$. From the First Derivative Test, since we are going from a negative slope to a positive slope, $$\left( {4,{{4}^{2}}-8\cdot 4} \right)=\left( {4,-16} \right)$$ is a relative extremum and is a minimum. Find the critical numbers, if any, and find the open interval(s) where the function is decreasing or increasing. Use the First Derivative Test to identify all relative extrema. $$\displaystyle f\left( x \right)=\frac{{{{x}^{2}}}}{{{{x}^{2}}-4}}$$  Take the derivative: $$\displaystyle f\left( x \right)=\frac{{{{x}^{2}}}}{{{{x}^{2}}-4}};\,\,\,\,\,\,{f}’\left( x \right)=\frac{{\left( {{{x}^{2}}-4} \right)\cdot 2x-{{x}^{2}}\cdot 2x}}{{{{{\left( {{{x}^{2}}-4} \right)}}^{2}}}}=\frac{{-8x}}{{{{{\left( {{{x}^{2}}-4} \right)}}^{2}}}}$$. Find critical numbers: $$\displaystyle \frac{{-8x}}{{{{{\left( {{{x}^{2}}-4} \right)}}^{2}}}}=0;\,\,\,\,-8x=0;\,\,\,x=0$$ (Notice that at $$x=\pm \,2$$, the derivative is undefined, and the original function is discontinuous, since these are asymptotes, but we’ll still use these in the sign chart. These are not critical numbers.) Create sign chart with both critical value and discontinuity values and check intervals, using derivative:  Thus, the function is increasing in the intervals $$\left( {-\infty ,-2} \right)$$ and $$\left( {-2,0} \right)$$, and decreasing in the intervals $$\left( {0,2} \right)$$ and $$\left( {2,\infty } \right)$$. From the First Derivative Test, since we are going from a positive slope to a negative slope, $$\left( {0,0} \right)$$ is a relative extrema and is a maximum. Find the critical numbers, if any, and find the open interval(s) where the function is decreasing or increasing. Use the First Derivative Test to identify all relative extrema. $$f\left( x \right)={{x}^{{\frac{1}{3}}}}+3$$  Take the derivative: $$\displaystyle f\left( x \right)={{x}^{{\frac{1}{3}}}}+3\,\,\,\,\,\,{f}’\left( x \right)=\frac{1}{3}{{x}^{{-\frac{2}{3}}}}$$. Find critical numbers: $$\displaystyle \frac{1}{3}{{x}^{{-\frac{2}{3}}}}=0;\,\,\,{{x}^{{-\frac{2}{3}}}}=0;\,\,\,\frac{1}{{\sqrt{{{{x}^{2}}}}}}=0;\,\,x\text{ is undefined}$$. The derivative is undefined at $$x=0$$, so this is a critical number. Create sign chart with critical value and check intervals, using derivative:  Thus, the function is increasing in the interval $$\left( {-\infty ,\infty } \right)$$, since the original function is defined at $$x=0$$. From the First Derivative Test, since both intervals have a positive slope, there are no relative extrema.

Here’s a First Derivative Problem with a trigonometric function:

< <

# Concavity and the Second Derivative

I like to think of concavity as “cup up” or “cup down”.  Think of concave upwards of a cup that can hold water at all points, and concave downward is a cup that empties water out at all point.

It turns out that when a graph is concave upward (cup up), its slope (first derivative) is increasing, so its second derivative is positive. When a graph is concave downward (cup down), its slope is decreasing, so its second derivative is negative.

A point of inflection (POI) is exactly where the concavity changes from concave up to concave down or concave down to concave up. It turns out that a graph crosses it’s tangent line at a POI.

Here’s an illustration of concavity: The Second Derivative Test can also be used in curve sketching to find relative minima and relative maxima, and is the following:

Second Derivative Test

Let $$f$$ be a function with $${f}’\left( c \right)=0$$ and the second derivative exists on an open interval that contains $$c$$:

1. If $${{f}^{\prime \prime}}\left( c \right)>0$$, $$f$$ has a relative minimum at $$x=c$$. (Think “cup up”)
2. If $${{f}^{\prime \prime}}\left( c \right)<0$$, $$f$$ has a relative maximum at $$x=c$$.  (Think “cup down”)

Note that the second derivative test does not necessarily work when the first and second derivatives are 0 or undefined. It also doesn’t say what happens at the endpoints of a function. (In these situations, the first derivative test must be used.)

You might see problems like this on concavity, points of inflection, and the Second Derivative Test. I think the best way to tackle these problems is to create a sign chart using points where the first derivative is 0 or undefined (critical values) and also where the second derivative is 0 or undefined: Here’s a concavity problem with a trigonometric function: Here are more Second Derivative Test problems: # Curve Sketching: General Rules

Let’s put it all together; here are some general curve sketching rules:

1. Find critical numbers (numbers that make the first derivative 0 or undefined).
2. Put the critical numbers in a sign chart to see where the first derivative is positive or negative (plug in the first derivative to get signs).
3. Where first derivative is positive, the function is increasing; where it’s negative, the function is decreasing (remember that you can combine two consecutive intervals only if the original function is defined for that critical number).
4. To get relative minimums and relative maximums, see how the derivative is changing. If it’s changing from negative to positive, it’s a minimum, and if it’s changing from positive to negative, it’s a maximum. To get the coordinates of the point at these places, plug the $$x$$ value into the original function to get the $$y$$ value.
5. Get the second derivative, and find the values where it’s either 0 or undefined. Note that a point of inflection (POI) is where the second derivative changes sign, and the original function is defined at that point.
6. Put those values in a sign chart to see where the second derivative is positive or negative (plug in the second derivative to get signs).
7. Where second derivative is positive, the graph is concave up, where the second derivative is negative, the graph is concave down (remember that you can combine two consecutive intervals only if the original function is defined for that for the first and second derivative).
8. Use other points (can use a t-chart) to help graph!

Also, these tips may help:

1. If finding absolute extrema, find the critical numbers and endpoints, then plug into the original function to find $$y$$ values. Compare all these values: the largest is the absolute maximum and the smallest is the absolute minimum.
2. When graphing, it might be helpful to identify any asymptotes or removable discontinuities (holes) by seeing what makes the denominator of the original function 0. Remember that a hole happens when you can cross out a factor in both the numerator and denominator (see Drawing Rational Graphs in the  Graphing Rational Functions, including Asymptotes Section).

Here are some other hints that may help with the relationship of $$f$$, $${f}’$$ and $${{f}^{\prime \prime}}$$. Again, remember that the relationship of $$f$$ to$${f}’$$ is the same as $${f}’$$ to $${{f}^{\prime \prime}}$$ (similarly, the relationship of $${f}’$$ to $$f$$ is the same as $${{f}^{\prime \prime}}$$ to$${f}’$$).

Also, I like to use the PMS acronym (sorry 🙂 ) to “travel” back and forth among the curves of the function, derivative, and second derivative:

 Function Derivative Second Derivative P:  Point of Inflection (POI) M:  Maximum or Minimum S:  Sign Change
 If…. Then…. If…. Then… $$f\left( x \right)$$ is increasing $${f}’\left( x \right)$$ is positive $${f}’\left( x \right)$$ is increasing $${{f}^{\prime \prime}(x)}$$ is positive $$f\left( x \right)$$ is decreasing $${f}’\left( x \right)$$ is negative $${f}’\left( x \right)$$ is decreasing $${{f}^{\prime \prime}(x)}$$ is negative $$f\left( x \right)$$ has a relative min or max $${f}’\left( x \right)$$ is 0 or does not exist (changes sign) $${f}’\left( x \right)$$ has a relative min or max $${{f}^{\prime \prime}(x)}$$ is 0 or does not exist (changes sign) $$f\left( x \right)$$ has a POI $${f}’\left( x \right)$$ has a relative min or max $${f}’\left( x \right)$$ has a POI $${{f}^{\prime \prime}(x)}$$ has a relative min or max $$f\left( x \right)$$ has a POI $${{f}^{\prime \prime}(x)}$$ changes sign $${f}’\left( x \right)$$ has a relative min or max $$f\left( x \right)$$ has a POI $$f\left( x \right)$$ is concave up $${{f}^{\prime \prime}(x)}$$ is positive $$f\left( x \right)$$ is concave down $${{f}^{\prime \prime}(x)}$$ is negative $${f}’\left( x \right)$$ changes from from negative to positive $$f\left( x \right)$$ has a relative min $${f}’\left( x \right)$$ changes from from positive to negative $$f\left( x \right)$$ has a relative max $${{f}^{\prime \prime}(x)}$$ changes from from negative to positive $${f}’\left( x \right)$$ has a relative min $${{f}^{\prime \prime}(x)}$$ changes from from positive to negative $${f}’\left( x \right)$$ has a relative max $${f}’\left( x \right)$$ is 0 or does not exist $$f\left( x \right)$$ could be relative min/max or a POI $${{f}^{\prime \prime}(x)}$$ has a relative min or max $${f}’\left( x \right)$$ has a POI $${f}’\left( x \right)$$ is 0  and $${{f}^{\prime \prime}(x)}$$ is 0 further investigation required $${{f}^{\prime \prime}(x)}$$ is 0 further investigation required $$f\left( x \right)$$ exists, $${f}’\left( x \right)$$ doesn’t exist possibly a vertical tangent, or an absolute max or min $${f}’\left( x \right)$$ is 0 horizontal tangent

Here are some problems that you may see: Here’s one where we might have the information in a table.

Sketch a possible graph:

 $$x<-1$$ $$x=-1$$ \(-1

Here is what the graph might look like: Here are more types of curve sketching problems you may see:  Here’s one more observation:

Here is an example graph of an original function, its first derivative, and second derivative. Notice how when we take the derivative in this example, we go from a cubic (original function) to a quadratic (first derivative) to a linear (second derivative). This makes sense, since the we are always going down a degree when we take a derivative: Learn these rules, and practice, practice, practice!

Click on Submit (the arrow to the right of the problem) to solve this problem. You can also type in more problems, or click on the 3 dots in the upper right hand corner to drill down for example problems.

If you click on “Tap to view steps”, you will go to the Mathway site, where you can register for the full version (steps included) of the software.  You can even get math worksheets.

You can also go to the Mathway site here, where you can register, or just use the software for free without the detailed solutions.  There is even a Mathway App for your mobile device.  Enjoy!

On to Optimization  – you are ready!

<