Skip to main content
\(\newcommand{\dollar}{\$} \DeclareMathOperator{\erf}{erf} \DeclareMathOperator{\arctanh}{arctanh} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section4.1First Derivative Test

Motivating Questions
  • What are the critical numbers of a function \(f\) and how are they connected to identifying the most extreme values the function achieves?

  • How does the first derivative of a function reveal important information about the behavior of the function? What information can we determine about the function using the first derivative?

  • How can we use the First Derivative Test to identify extreme values of the function?

In many different settings, we are interested in knowing where a function achieves its least and greatest values. These can be important in applications, such as identifying a point at which maximum profit or minimum cost occurs, or in theory such as characterizing the behavior of a function or of a family of related functions.

SubsectionIncreasing and Decreasing Functions

So far, we have used the words increasing and decreasing intuitively to describe a function's graph. Here we define these terms more formally.

Increasing and Decreasing Functions

Given a function \(f(x)\) defined on the interval \((a,b)\text{,}\) we say that \(f\) is increasing on \((a,b)\) provided that \(f(x)\lt f(y)\) whenever \(a\lt x\lt y\lt b\text{.}\) Similarly, we say that \(f\) is decreasing on \((a,b)\) provided that \(f(x)\gt f(y)\) whenever \(a\lt x\lt y\lt b\text{.}\)

Simply put, an increasing function is one that is rising as we move from left to right along the graph (i.e. as the inputs increase), and a decreasing function is one that falls as we move left to right.

Given a differentiable function \(y= f(x)\text{,}\) we know that its derivative, \(y' = f'(x)\text{,}\) is the function whose output at \(x=a\) tells us the slope of the tangent line to \(y = f(x)\) at the point \((a,f(a))\text{.}\)

At a point where \(f'(x)\) is positive, the slope of the tangent line to \(f\) is positive. Therefore, on an interval where \(f'(x)\) is positive, the function \(f\) is increasing. Similarly, if \(f'(x)\) is negative on an interval, the graph of \(f\) is decreasing . An example of this can be seen in Figure4.1 below.

The derivative of \(f\) tells us not only whether the function \(f\) is increasing or decreasing on an interval, but also how fast the function \(f\) is increasing or decreasing. Look at the two tangent lines shown below in Figure4.1. We see that at point \(A\) the value of \(f'(x)\) is positive and relatively close to zero, and at that point the graph is rising slowly. By contrast, at point \(B\text{,}\) the derivative is negative and relatively large in absolute value, and \(f\) is decreasing rapidly at \(B\text{.}\)

Figure4.1Two tangent lines on a graph.

Let \(f\) be a function that is differentiable on an interval \((a,b)\text{.}\) If the function \(f\) is increasing on \((a,b)\) then \(f'(x) \geq 0\) for every \(x\) in the interval \((a, b)\text{.}\) Conversely, if \(f'(x) > 0\) for every \(x\) in the interval, then the function \(f\) must be increasing on the interval.

Notice that we have to have the derivative strictly positive to conclude that the function is increasing. Letting \(f\) be a constant function shows that if the derivative can be zero, then the function need not be increasing. Also, knowing the function is increasing is not enough to conclude that the derivative is strictly positive. The function \(f(x)=x^3\) is increasing on \((-1,1)\) but \(f'(0)=0\text{.}\)

Similarly, if the function \(f\) is decreasing on \((a,b)\) then \(f'(x) \leq 0\) for every \(x\) in the interval \((a, b)\text{.}\) Conversely, if \(f'(x) \lt 0\) for every \(x\) in the interval, then the function \(f\) must be decreasing on the interval.

For example, the function pictured below in Figure4.2 is increasing on the entire interval \(-2 \lt x \lt 0\text{.}\) Note that at both \(x = \pm 2\) and \(x = 0\text{,}\) we say that \(f\) is neither increasing nor decreasing, because \(f'(x) = 0\) at these values.

Figure4.2A function that is decreasing on the intervals \(-3 \lt x \lt -2\) and \(0 \lt x \lt 2\) and increasing on \(-2 \lt x \lt 0\) and \(2 \lt x \lt 3\text{.}\)

If the function has a derivative, the sign of the derivative tells us whether the function is increasing or decreasing.

Increasing and Decreasing Functions

Given a function \(f(x)\) is differentiable on the interval \((a,b)\text{,}\)

If \(f'(x)\gt 0\) for all \(a \lt x \lt b \text{,}\) then \(f(x)\) is increasing on \((a,b)\).

If \(f'(x)\lt 0\) for all \(a \lt x \lt b \text{,}\) then \(f(x)\) is decreasing on \((a,b)\).

SubsectionMinima and Maxima of Functions

Consider the simple and familiar example of a parabolic function such as \(s(t) = -16t^2 + 32t + 48\) (shown on the left of Figure4.3 below) that represents the height of an object tossed vertically: its maximum value occurs at the vertex of the parabola and represents the greatest height the object reaches. This maximum value is an especially important point on the graph, the point at which the curve changes from increasing to decreasing.

Relative Maxima and Minima

We say that \(f(c)\) is a relative maximum of \(f\) provided that \(f(c) \ge f(x)\) for all \(x\) near \(c\text{.}\) Likewise, \(f(c)\) is called a relative minimum of \(f\) whenever \(f(c) \le f(x)\) for all \(x\) near \(c\text{.}\)

The vertex in the graph \(s(t) = -16t^2 + 32t + 48\) (shown on the left of Figure4.3 below) is a relative maximum. If we consider the graph of \(y=g(x)\) on the right of Figure4.3 below; \(g\) has a relative minimum of \(g(b)\) at the point \((b,g(b))\) and two relative maximum at both \((a,g(a))\text{,}\) and \((c,g(c))\text{.}\) It is important to note from this example that a function may have many relative maximum or minimum values.

Another piece of terminology to be familiar with is that any maximum or minimum may also be called an extreme value of \(f\text{.}\)

Figure4.3On the left, the graph of \(y=s(t)\text{,}\) where \(s(t) = -16t^2 + 24t + 32\) is a parabola whose vertex is \(\left(\frac{3}{4}, 41\right)\text{;}\) on the right, the graph of \(y=g(x)\text{,}\) where \(g\) is a function that demonstrates several high and low points.

We would like to use calculus ideas to identify and classify key function behavior, including the location of relative extrema. Of course, if we are given a graph of a function, it is often straightforward to locate these important behaviors visually. We see this below in Example4.4.

Example4.4

Consider the function \(h\) given by the graph in Figure4.5 below. Use the graph to answer each of the following questions.

Figure4.5The graph of \(y=h(x)\) on the interval \([-3,3]\text{.}\)
  1. Identify all of the values of \(c\) for which \(h(c)\) is a relative maximum of \(h\text{.}\)

  2. Identify all of the values of \(c\) for which \(h(c)\) is a relative minimum of \(h\text{.}\)

  3. Identify all values of \(c\) for which \(h'(c)\) does not exist.

  4. True or false: every relative maximum and minimum of \(h\) occurs at a point where \(h'(c)\) is either zero or does not exist.

  5. True or false: at every point where \(h'(c)\) is zero or does not exist, \(h\) has a relative maximum or minimum.

Answer
  1. \(c=-2\) and \(c=1\text{.}\)

  2. \(c=0\text{.}\)

  3. \(c=-2\text{,}\) \(c=0\text{,}\) and \(c=1.5\text{.}\)

  4. True.

  5. False.

Solution
  1. The graph shows that \(h(x)\le-1=h(-2)\) for every \(x\) near \(-2\) and \(h(x)\le2=h(1)\) for every \(x\) near \(1\text{.}\) We notice that these are points where \(h\) switches from increasing to decreasing. Since there are no other points on the graph where the \(y\)-coordinate is larger than everything nearby, it follows that the only relative maxima of \(h\) on this domain occur at \(c=-2\) and \(c=1\text{.}\)

  2. The graph shows that \(h(x)\ge-2=h(0)\) for every \(x\) near \(0\text{,}\) a point where \(h\) switches from decreasing to increasing. Since this is the only point shown where this occurs, we say that the only relative minimum of \(h\) on this domain occurs at \(c=0\text{.}\)

  3. Recall that \(h'(c)\) only exists when all of the following are true:

    • \(h(c)\) is defined,

    • \(\displaystyle \lim_{x\to c}h(x)\) exists,

    • \(\displaystyle \lim_{x\to c}h(x)=h(c)\text{,}\) and

    • \(\displaystyle \lim_{a\to0}\frac{h(c+a)-h(c)}a\) exists.

    Assuming \(h\) is continuous at \(c\) (i.e. the first three points hold), the main consequence of the final point is that a corner or a cusp at \((c,h(c))\) makes \(h\) nondifferentiable at \(c\text{.}\)

    With all this in mind, we can say that \(h'(c)\) does not exist at \(c=-2\text{,}\) \(c=0\text{,}\) or \(c=1.5\) because \(h\) has a cusp at these points.

  4. This is true. Every relative extremum of \(h\) occurs at a point where \(h'(c)\) is either zero or does not exist.

  5. This is false. Some points at which \(h'(c)\) is zero or undefined are not relative extrema. In particular, \(h'(-2.5)\) is zero, but the graph is non-decreasing near \((-2.5,-2)\text{.}\) Similarly, \(h'(1.5)\) is undefined, but the graph is non-increasing near \((1.5,1)\text{.}\) Neither of these points is a relative maximum or minimum.

SubsectionCritical Points and the First Derivative Test

Figure4.6From left to right: a function with a relative maximum where its derivative is zero; a function with a relative maximum where its derivative is undefined; a function with neither a maximum nor a minimum at a point where its derivative is zero; a function with a relative minimum where its derivative is zero; and a function with a relative minimum where its derivative is undefined.

Suppose a function \(f\) is continuous on an open interval \((a,b)\text{.}\) If \(f\) has a relative maximum at some number \(c\) in this interval, then \(f\) must be increasing in some interval just before \(c\) and decreasing in some interval just after \(c\text{.}\) These intervals could be quite small. Conversely, if \(f\) is increasing in an interval just before \(c\) and decreasing in an interval just after \(c\text{,}\) then \(f\) must have a relative maximum at \(c\text{.}\)

The natural analogue holds for relative minima: if \(f\) has a relative minimum at some number \(c\) in this interval, then \(f\) is decreasing in some interval just before \(c\) and increasing just after \(c\text{.}\) Conversely, if \(f\) is decreasing in some interval just before \(c\) and increasing in an interval just after \(c\text{,}\) then \(f\) must have a relative minimum at \(c\text{.}\) (See Figure4.6 above.) There are only two possible ways for these changes in behavior to occur: either \(f'(c) = 0\) or \(f'(c)\) is undefined. Because these values of \(c\) are so important, we call the point \((c,f(c))\) a critical point.

Critical Point

We say that a function \(f\) has a critical point at \((c,f(c))\) provided that \(c\) is in the domain of \(f\text{,}\) and \(f'(c) = 0\) or \(f'(c)\) is undefined. When \((c,f(c))\) is a critical point, we say that \(c\) is a critical number of the function, or that \(f(c)\) is a critical value.

Critical points are the only possible locations where the function \(f\) may have relative1Absolute extrema occur only at critical points or at endpoints for functions defined on a fixed domain. extrema. Note that not every critical point produces a maximum or minimum; in the middle graph of Figure4.6, the function pictured there has a horizontal tangent line at the noted point, but the function is increasing before and increasing after, so the critical point does not yield a maximum or minimum. Two other such points appeared earlier in Figure4.5 of Example4.4.

The first derivative test summarizes how sign changes in the first derivative (which can only occur at critical numbers) indicate the presence of a relative maximum or minimum for a given function.

First Derivative Test

If \(x=c\) is a critical number of a continuous function \(f(x)\) that is differentiable near \(x=c\) (except possibly at \(x = c\)), then \(f\) has a relative maximum at \(x=c\) if and only if \(f'\) changes sign from positive to negative at \(c\text{,}\) and \(f\) has a relative minimum at \(x=c\) if and only if \(f'\) changes sign from negative to positive at \(c\text{.}\)

Example4.7

Consider the function \(s(t) = -16t^2 + 24t + 32\) (shown on the left of Figure4.3). To find the relative extrema:

Step 1 Find the derivative of \(s(t)\text{.}\)

\begin{equation*} s'(t)=-32t+24 \end{equation*}

Step 2 Find any critical numbers of \(s(t)\) by (1) setting \(s'(t)=0\) and solving for \(t\) and (2) finding all values of \(t\) for which \(s'(t)=DNE\text{.}\) Let us consider (2) first. Since \(s'(t)=-32t+24 \) is defined everywhere, then there are no values of \(t\) for which \(s'(t)=DNE\text{.}\) So, we need only consider (1). Setting \(s'(t)=0\text{,}\) we have

\begin{equation*} -32t+24=0, \end{equation*}

and subtracting \(24\) from both sides and dividing by \(-32\) gives

\begin{equation*} t= \frac{-24}{-32}=\frac{3}{4}. \end{equation*}

Thus we found a single critical number \(t=\frac{3}{4}\text{.}\)

Step 3 Consider the sign of the derivative on either side of the critical point to determine if the function is increasing or decreasing. In this case \(s'(0)=24\gt0\text{,}\) thus \(s(t)\) is increasing to the left of the critical point. Also \(s'(1)=-8\lt0\text{,}\) thus \(s(t)\) is decreasing to the right of critical point.

Step 4 Interpret your results from Step 3. Since the function goes from increasing to decreasing at \(t=\frac{3}{4}\text{,}\) the function has a relative maximum at \((\frac{3}{4},s(\frac{3}{4}))\) (shown on the left of Figure4.3).

Example4.8

Consider the function \(f(x) =2x^3-3x^2-12x+1\text{,}\) find the relative extrema:

Step 1 Find the derivative of \(f(x)\text{.}\)

\begin{equation*} f'(x)=6x^2-6x-12 \end{equation*}

Step 2 Find any critical numbers of \(f(x)\) by (1) setting \(f'(x)=0\) and solving for \(x\) and (2) considering when \(f'(x)=DNE\text{.}\) Let us consider (2) first. Since \(f'(x)=6x^2-6x-12\) is defined everywhere, then there are no values of \(x\) for which \(f'(x)=DNE\text{.}\) So, we need only consider (1). Setting \(f'(x)=0\text{,}\) we have

\begin{equation*} 6x^2-6x-12=0, \end{equation*}

and factoring 6 out of the equation and factoring, we have

\begin{equation*} 6(x^2-x-2)=6(x-2)(x+1)=0. \end{equation*}

So, there are two critical numbers \(x=2,-1\text{.}\)

Step 3 Consider the sign of the derivative on either side of the critical points to determine if the function is increasing or decreasing. In this case we need to test the sign at three points: \(f'(-2)=24\gt0\text{,}\) thus \(f(x)\) is increasing when \(x\lt-1\text{;}\) \(f(0)=-12\lt0\text{,}\) thus \(f(x)\) is decreasing for \(-1 \lt x \lt 2\text{;}\) and \(f'(3)=24\gt0\text{,}\) thus \(f(x)\) is increasing for \(x\gt 2\text{.}\)

Step 4 Interpret your results from Step 3. Since \(f(x)\) goes from increasing to decreasing at \(x=-1\text{,}\) then \(f(x)\) has a relative maximum at \((-1,f(-1))\text{.}\) Since \(f(x)\) goes from decreasing to increasing at \(x=2\text{,}\) then \(f(x)\) has a relative minimum at \((2,f(2))\text{.}\)

Example4.9

Let \(f\) be a function whose derivative is given by the formula \(f'(x) = e^{-2x}(3-x)(x+1)^2\text{.}\) Determine all critical numbers of \(f\) and decide whether a relative maximum, relative minimum, or neither occurs at each.

Answer

\(-1\) is a critical number that is not a relative extremum. \(3\) is a relative maximum.

Solution

Since we already have \(f'(x)\) written in factored form, it is straightforward to find the critical numbers of \(f\text{.}\) Because \(f'(x)\) is defined for all values of \(x\text{,}\) we need only determine where \(f'(x) = 0\text{.}\) From the equation

\begin{equation*} e^{-2x}(3-x)(x+1)^2 = 0 \end{equation*}

and the zero product property2The zero product property says that if \(ab=0\text{,}\) where \(a\) and \(b\) are expressions representing real numbers (e.g. \(a=(3-x)\text{,}\) where \(x\) is a real number), then it must be the case that \(a=0\) or \(b=0\) (or both)., it follows that \(x = 3\) and \(x = -1\) are critical numbers of \(f\text{.}\) (There is no value of \(x\) that makes \(e^{-2x} = 0\text{.}\))

Next, to apply the first derivative test, we'd like to know the sign of \(f'(x)\) at inputs near the critical numbers. Because the critical numbers are the only locations at which \(f'\) can change sign, it follows that the sign of the derivative is the same on each of the intervals created by the critical numbers: for instance, the sign of \(f'\) must be the same for every \(x \lt -1\text{.}\) What this means is that we can choose (carefully) where to evaluate the derivative in order to ascertain its sign on a given interval. Since \(f'(-1.000001)\) and \(f'(-2)\) must have the same sign, we may as well evaluate \(f'(x)\) at \(-2\) to figure out the sign of \(f'\) for \(x\lt -1\text{.}\) We create a first derivative sign chart (displayed below, with explanation following) to summarize the sign of \(f'\) on the relevant intervals, along with the corresponding behavior of \(f\text{.}\)

Figure4.10The first derivative sign chart for a function \(f\) whose derivative is given by the formula \(f'(x) = e^{-2x}(3-x)(x+1)^2\text{.}\)

To produce the first derivative sign chart in Figure4.10, we start by marking the critical numbers \(-1\) and \(3\) on the number line. We then identify the sign of each factor of \(f'(x)\) at one selected point in each interval. The intervals in this example are \(x\lt-1\text{,}\) \(-1\lt x\lt3\text{,}\) and \(x\gt3\text{;}\) we will choose \(x=-2\text{,}\) \(x=0\text{,}\) and \(x=5\) for our selected points. The process with \(x=-2\) is laid out below:

For \(x \lt -1\text{,}\) we use the value \(x=-2\) to determine the sign of \(e^{-2x}\text{,}\) \((3-x)\text{,}\) and \((x+1)^2\text{.}\) We note that \(e^{-2x}\) is positive regardless of the value of \(x\text{,}\) \((x+1)^2\) is positive whenever it is nonzero which is everywhere within the intervals of interest since we intentionally plucked out the zeros and that \((3-x)\) is also positive at \(x = -2\text{.}\) Hence each of the three terms in \(f'\) is positive, and we indicate this by writing \(+++\) above the interval \(x\lt-1\text{.}\) Taking the product of three positive terms results in a positive value for \(f'\text{,}\) so we denote the sign of \(f'\) by a \(+\) above the appropriate interval in the chart. Finally, since \(f'\) is positive on that interval, we know that \(f\) is increasing, so we write INC to represent the behavior of \(f\text{.}\)

In a similar fashion, we find that \(f'\) is positive (because \(3-(0)\gt0\) and the other terms are also still positive) and \(f\) is increasing on \(-1 \lt x \lt 3\text{,}\) and that \(f'\) is negative (because \(3-(5)\lt0\) but the other terms are still positive) and \(f\) is decreasing for \(x \gt 3\text{.}\)

Now we look for critical numbers at which \(f'\) changes sign. In this example, \(f'\) changes sign only at \(x = 3\text{,}\) from positive to negative, so \(f\) has a relative maximum at \(x = 3\text{.}\) Although \(f\) has a critical number at \(x = -1\text{,}\) since \(f\) is increasing both before and after \(x = -1\text{,}\) \(f\) has neither a minimum nor a maximum at \(x = -1\text{.}\)

Example4.11

Suppose \(g\) is a function that is continuous for every value of \(x \) except \(x=2 \text{,}\) and whose first derivative is \(\displaystyle g'(x) = \frac{(x+4)(x-1)^2}{x-2}\text{.}\) Further, assume that it is known that \(g\) has a vertical asymptote at \(x = 2\text{.}\)

  1. Determine all critical numbers of \(g\text{.}\)

  2. By developing a carefully labeled first derivative sign chart, decide whether \(g\) has as a relative maximum, relative minimum, or neither at each critical number.

Answer
  1. \(x = -4\) or \(x = 1\text{.}\)

  2. \(g\) has a relative maximum at \(x = -4\) and neither a max nor min at \(x = 1\text{.}\)

Solution
  1. Since \(g'(x) = \frac{(x+4)(x-1)^2}{x-2}\text{,}\) we see that \(g'(x) = 0\) implies that \(x = -4\) or \(x = 1\text{.}\) Although \(x = 2\) makes \(g'\) undefined, we are told that \(g\) has a vertical asymptote at \(x = 2\text{.}\) So \(x = 2\) is not in the domain of \(g\text{,}\) and hence is technically not a critical number of \(g\text{.}\) Nonetheless, we place \(x = 2\) on our first derivative sign chart since the vertical asymptote is a location at which \(g'\) may change sign.

  2. The first derivative sign chart shows that:

    • \(g'(x) \gt 0\) for \(x \lt -4\text{,}\)
    • \(g'(x) \lt 0\) for \(-4 \lt x \lt 1\text{,}\)
    • \(g'(x) \lt 0\) for \(1 \lt x \lt 2\text{,}\) and
    • \(g'(x) \gt 0\) for \(x \gt 2\text{.}\)

    By the first derivative test, \(g\) has a relative maximum at \(x = -4\) and neither a max nor min at \(x = 1\text{.}\) As these are the only two critical numbers, these are the only two locations for possible extrema. (Note: although \(g\) changes from decreasing to increasing at \(x = 2\text{,}\) this is due to a vertical asymptote, and \(g\) does not have a minimum there.)

SubsectionSummary

  • The critical numbers of a continuous function \(f\) are the values of \(x=c\) for which \(f'(c) = 0\) or \(f'(c)\) does not exist. These values are important because they identify horizontal tangent lines or corner points on the graph, which are the only possible locations at which a relative maximum or relative minimum can occur.

  • Given a differentiable function \(f\text{:}\) whenever \(f'\) is positive, \(f\) is increasing; whenever \(f'\) is negative, \(f\) is decreasing. The first derivative test tells us that at any point where \(f\) changes from increasing to decreasing, \(f\) has a relative maximum, while conversely at any point where \(f\) changes from decreasing to increasing \(f\) has a relative minimum.

SubsectionExercises