###
Subsection 10.2.2 Describing Extreme Values Using Derivatives

Fermat's theorem states that a function \(f\) can have an extreme value only at points where either \(f'(x)=0\) or \(f'(x)\) does not exist. This motivates the definition of critical points.

######
Definition 10.2.4 Critical Points

Given a function \(f\) with domain \(D\text{,}\) a value \(c \in D\) is a critical point of \(f\) if \(f'(c)=0\) or \(f'(c)\) does not exist.

Not every critical point is an extreme value. We need criteria to judge whether or not a given critical point is the location of a maximum or minimum value. Intervals of monotonicity, as determined by the derivative, allow us to make that conclusion. Using monotonicity to classify critical points is justified by the following theorem, known as the first derivative test.

######
Theorem 10.2.5 First Derivative Test for Local Extrema

Suppose that \(f\) is continuous at a critical point at \(x=c\text{.}\) If \(f\) is monotone on intervals immediately to the left and right of \(c\text{,}\) then the critical point can be classified as follows.

If \(f\) is increasing on the left of \(c\) and decreasing on the right of \(c\text{,}\) then \(f\) has a *local maximum* at \(x=c\text{.}\)

If \(f\) is decreasing on the left of \(c\) and increasing on the right of \(c\text{,}\) then \(f\) has a *local minimum* at \(x=c\text{.}\)

Otherwise, \(f\) has neither a local maximum or minimum at \(x=c\text{.}\)

The first derivative test is usually applied by looking at the number line summary of the first derivative.

######
Example 10.2.6

Find and classify the local extremes of \(f(x) = x^3(x^2-4)\text{.}\)

Solution
Start by finding the critical points, which requires knowing the derivative.

\begin{equation*}
f(x)=x^5-4x^3 \qquad \Rightarrow \qquad f'(x) = 5x^4-12x^2 = x^2(5x^2-12)
\end{equation*}

Now solve \(f'(x)=0\text{,}\) which gives either \(x^2=0\) or \(5x^2-12=0\text{.}\) There are three solutions: \(x=0\) and \(x=\pm \sqrt{\frac{12}{5}}\text{.}\) Because \(f'(x)\) is defined for all values of \(x\text{,}\) these three are the only critical points.

We test if the critical points are local extremes by seeing if the direction of monotonicity changes at these points. This is summarized using a number line. Testing the value of \(f'(x)\) at points, such as the set \(\{-2, -1, 1, 2\}\text{,}\) gives us the following signs for the rate of change.

We interpret our results by applying the First Derivative Test. The critical points at \(x=\pm\sqrt{\frac{12}{5}}\) are turning points. But \(x=0\) is not a turning point even though \(f'(0)=0\text{.}\) Instead, it is a point of inflection. (We would need to show that \(f''(x)\) changes sign at \(x=0\text{.}\)) The point \(x=-\sqrt{\frac{12}{5}}\) is a local maximum because it is a turning point going from increasing to decreasing. The point \(x=+\sqrt{\frac{12}{5}}\) is a local minimum because it is a turning point going from decreasing to increasing. A graph of \(y=f(x)\) is shown below.

###
Subsection 10.2.3 Describing Concavity Using Derivatives

Concavity describes changing slope or rate of change. On a graph, this corresponds to how the curve described by a function is bending. We restate the definition of concavity in terms of the rate of change defined by a derivative.

######
Definition 10.2.7 Concavity

Let \(f\) be a function such that the derivative \(f'\) is defined on an interval \(I\text{.}\) We say \(f\) is concave up on \(I\) if \(f'\) is increasing on \(I\text{.}\) We say \(f\) is concave down on \(I\) if \(f'\) is decreasing on \(I\text{.}\)

The four quadrants of a circle illustrate the four possible combinations of monotonicity and concavity.

- increasing, concave down (II)
The function has a positive rate of change and that rate of change is decreasing. The graph has a positive slope that is becoming less steep (less positive).

- increasing, concave up (IV)
The function has a positive rate of change and that rate of change is increasing. The graph has a positive slope that is becoming steeper (more positive).

- decreasing, concave down (I)
The function has a negative rate of change and that rate of change is decreasing. The graph has a negative slope that is becoming steeper (more negative).

- decreasing, concave up (III)
The function has a negative rate of change and that rate of change is increasing. The graph has a negative slope that is becoming less steep (less negative).

Concavity is described by finding where the derivative is increasing or decreasing. Since the derivative is itself a function, we can find its derivative. This function will be the derivative of the derivative of the function \(f\text{,}\) or the second derivative. We write

\begin{equation*}
f''(x) = \frac{d}{dx}[f'(x)] = \frac{d^2}{dx^2}[f(x)] = \frac{d^2f}{dx^2}.
\end{equation*}

######
Theorem 10.2.8 Concavity of Twice-Differentiable Functions

Given a function \(f\) for which \(f'\) and \(f''\) are defined on an interval \(I\text{.}\)

If \(f''(x) \gt 0\) for all \(x \in I\text{,}\) then \(f(x)\) is concave up on \(I\text{.}\)

If \(f''(x) \lt 0\) for all \(x \in I\text{,}\) then \(f(x)\) is concave down on \(I\text{.}\)

If \(f''(x) = 0\) for all \(x \in I\text{,}\) then \(f(x)\) is linear on \(I\text{.}\)

If the interval \(I\) is open but \(f'\) is continuous up to and including the end-points, then the conclusion can be extended to include the end-points as well.

###### Proof

This is just an application of Theorem Theorem 10.2.1 applied to \(f'\text{.}\) Once we know that \(f'\) is increasing on \(I\text{,}\) the definition of concavity allows us to say that \(f\) is concave up on \(I\text{.}\) Similarly, knowing that \(f'\) is decreasing is equivalent to saying that \(f\) is concave down. If \(f'\) is constant on an interval \(I\text{,}\) this is exactly what it means for \(f\) to be linear on \(I\text{.}\)

######
Example 10.2.9

The concavity of a parabola is completely determined by the sign of the leading coefficient. Suppose \(f(x) = ax^2+bx+c\text{,}\) where \(a\text{,}\) \(b\) and \(c\) are parameters. Then \(f'(x) = 2ax+b\) and \(f''(x)=2a\text{.}\) The second derivative for a quadratic is constant, and the sign is determined by the sign of \(a\text{.}\) If \(a \gt 0\text{,}\) \(f\) is concave up on \((-\infty,\infty)\text{;}\) if \(a \lt 0\text{,}\) \(f\) is concave down on \((-\infty,\infty)\text{.}\)

######
Definition 10.2.10 Inflection Point

A differentiable function \(f\) has an inflection point at a point \(x=a\) if \(a \in \mathrm{dom}(f)\) and \(f\) changes concavity at \(x=a\text{.}\) That is, there is are intervals \((a-\delta,a)\) and \((a,a+\delta)\) for \(\delta \gt 0\) such that \(f\) has opposite concavity in these intervals.

######
Example 10.2.11

Given \(f(x) = x^3-3x^2-4x+5\text{,}\) describe where \(f\) is concave up and concave down.

Solution
Start by finding \(f'(x)\) and \(f''(x)\text{.}\)

\begin{align*}
f(x) &= x^3-3x^2-4x+5 \\
f'(x) &= 3x^2-6x-4 \\
f''(x) &= 6x-6
\end{align*}

We now see where \(f''(x)\) changes sign by solving \(6x-6=0\text{.}\) This has a single solution \(x=1\text{.}\) We test the sign of \(f''(x)\) by choosing values for \(x\) on either side of \(x=1\text{.}\)

\begin{gather*}
f''(0) = -6 \\
f''(2) = 6
\end{gather*}

The signs of \(f''(x)\) are summarized with a number line.

We interpret our results using Theorem Theorem 10.2.8. Because \(f''(x) \lt 0\) on \((-\infty,1)\text{,}\) we know \(f'\) is decreasing on the interval. Since \(f'(x)\) is continuous, we can extend the interval to include the end-point and conclude that \(f\) is concave down on \((-\infty,1]\text{.}\) Similarly, since \(f''(x) \gt 0\) on \((1,\infty)\) and \(f'\) is continuous at \(1\text{,}\) we know \(f\) is concave up on \([1,\infty)\text{.}\) Because concavity changes at \(x=1\text{,}\) \(f\) has an inflection point at \(x=1\text{.}\)

When a second derivative can be determined conveniently, there is another way to determine whether a critical point is a turning point corresponding to a local extreme. Suppose \(f'(a)=0\) but \(f''(a)\) is positive. This means that \(f'(x)\) is increasing in a neighborhood of \(x=a\text{.}\) Consequently, \(f'(x) \lt 0\) in an interval with \(x \lt a\) and \(f'(x) \gt 0\) in an interval with \(x \gt 0\text{.}\) By the First Derivative Test, \(f(x)\) must have a minimum at \(x=a\text{.}\)

Graphically, this means that at \(x=a\) there is a horizontal tangent with the graph concave up (like a parabola). This point then behaves like the vertex of a parabola opening upward and \(x=a\) is a local minimum. Similarly if \(f''(a) \gt 0\text{,}\) the function is concave down and the graph behaves somewhat like a downward opening parabola and the point \(x=a\) would be a local maximum. These results are summarized as a theorem.

######
Theorem 10.2.12 Second Derivative Test for Local Extrema

Suppose that \(f(x)\) is a function satisfying \(f'(a)=0\) (horizontal tangent) such that \(f''(a)\) exists. If \(f''(a) \gt 0\) (concave up), then \(f(x)\) has a local minimum at \(x=a\text{.}\) If \(f''(a) \lt 0\) (concave down), then \(f(x)\) has a local maximum at \(x=a\text{.}\)

Notice that the Second Derivative Test is inconclusive when \(f''(a)=0\text{.}\) In such a case, we are forced to go back and use the First Derivative Test to see if monotonicity changes.

######
Example 10.2.13

Find and classify the local extremes of \(f(x) = x^3(x^2-4)\) using the Second Derivative Test.

Solution
In the previous example, we solved the same problem. We found \(f'(x) = 5x^4-12x^2\text{.}\) The critical points were at \(x=0\) and \(x=\pm \sqrt{\frac{12}{5}}\text{.}\) The Second Derivative Test has us compute \(f''(x)=20x^3-24x\) and determine the sign of \(f''(x)\) at each of the critical points.

\begin{align*}
f''(x) &= 20x^3-24x = 4x(5x^2-6)\\
f''(0) &= 0\\
f''(-\sqrt{\frac{12}{5}}) &= -4 \sqrt{\frac{12}{5}} (5(\frac{12}{5})-6) = -24 \sqrt{\frac{12}{5}} \lt 0\\
f''(+\sqrt{\frac{12}{5}}) &= +4 \sqrt{\frac{12}{5}} (5(\frac{12}{5})-6) = 24 \sqrt{\frac{12}{5}} \gt 0
\end{align*}

The Second Derivative Test is inconclusive about \(x=0\) being a turning point. Since \(f(x)\) is locally concave down at the critical point \(x=-\sqrt{\frac{12}{5}}\text{,}\) the Second Derivative Test implies that \(f(x)\) has a local maximum at this point. Similarly, \(f(x)\) has a local minimum at \(x=+\sqrt{\frac{12}{5}}\text{.}\)

From a practical point of view, in order to find the critical points, you will already have had to factor \(f'(x)\text{.}\) If finding the signs of \(f'(x)\) on the resulting intervals will be faster than computing \(f''(x)\) and then computing the sign at each critical points, then the First Derivative Test is a better strategy. The second derivative test is useful if finding \(f''(x)\) will be especially easy, or at least easier than finding the signs of \(f'(x)\text{.}\)