Previously, we defined the concept of a local maximum and a local minimum. We showed that if \(f(c)\) is a local maximum or local minimum, then \(x=c\) is a critical number; that is, \(f'(c)=0\) or \(f'(c)\) does not exist. However, we did not discuss how to determine if \(f(c)\) is a local maximum, a local minimum, or neither. In this section, we provide a method for that.

Before we start, recall that if \(f'(x)>0\) on an interval, then \(f\) is an increasing function on that interval, and if \(f'(x)<0\), then \(f\) is a decreasing function (see this section).

  • As we move along the curve of a function from left to right, if the sign of the derivative changes from \(+\) to \(-\) because the function changes from increasing \(\nearrow\) to decreasing \(\searrow\), the function has a local (or relative) maximum at the critical point (see Figure 1).
Figure 1.
  • As we move along the curve from left to right, if the sign of the derivative changes from \(-\) to \(+\) because the function changes from decreasing \(\searrow\) to increasing \(\nearrow\), the function has a local (or relative) minimum at the critical point (see Figure 2).
Figure 2.
  • As we move along the curve from left to right, if the sign of the derivative on the left and on the right of a critical point is the same, the function has no local maximum or minimum at the critical point (see Figure 3).
Figure 3.

More precisely, we have the following theorem.

Theorem 1. (First Derivative Test) Assume \(f\) is continuous at the critical point \(c\).

(a) If \(f’\) is \(+\) to the left of \(c\) and is \(-\) to the right of \(c\), then \(f\) has a local maximum at \(c\).

(b) If \(f’\) is \(-\) to the left of \(c\) and is \(+\)to the right of \(c\), then \(f\) has local minimum at \(c\).

(c) If the sign of \(f’\) is the same to the right and left of \(c\), then \(f\) does NOT have a local extremum at \(c\).

  • To remember the First Derivative Test, visualize \(\nearrow\searrow\) for the case where \(f’\) varies from \(+\) to \(-\) and \(\searrow\nearrow\) for the case where \(f’\) varies from \(-\) to \(+\).
  • Recall that the critical points are the only possible candidates for local extrema.
Example 1
Find the local maxima and minima of \[f(x)=\frac{1}{2}x^{3}-\frac{3}{2}x^{2}+1.\]
Solution
Because \(f\) is a polynomial, it is differentiable everywhere, so the critical points are the points where \(f'(x)=0\).
\[f(x)=\frac{1}{2}x^{3}-\frac{3}{2}x^{2}+1\]
\[\Rightarrow f'(x)=\frac{3}{2}x^{2}-3x=\frac{3}{2}x(x-2).\] Critical points: \[f'(x)=0\Longleftrightarrow x=0,x=2.\]

As this sign table shows, because the sign of \(f’\) changes from \(+\) to \(-\) at \(x=0\), the function has a local maximum there, and because the sign of \(f’\) changes from \(-\) to \(+\) at \(x=2\), the function has a local minimum at \(x=2\). The graph of \(f\) is shown in Figure 4.

Figure 4. Graph of \(f(x)=\frac{1}{2}x^{3}-\frac{3}{2}x^{2}+1\).
Example 2
Find the local maxima and minima of \[f(x)=3x^{5/3}-15x^{2/3}.\]
Solution
First we calculate \(f’\):
\[\begin{align} f'(x) & =3(\frac{5}{3})x^{\frac{5}{3}-1}-15(\frac{2}{3})x^{\frac{2}{3}-1}\\ & =5x^{2/3}-10x^{-1/3}\\ & =5x^{-1/3}(x-2)\\ & =\frac{5(x-2)}{\sqrt[3]{x}}\end{align}\]
It is clear that \(f’\) is not defined for \(x=0\) (because the denominator is zero when \(x=0\)) and \(f'(2)=0\). Therefore, the critical points of \(f\) are \(x=0\) and \(x=2\).
Now we need to determine the sign of \(f’\):

Therefore, \(f\) has a local maximum at \(x=0\) and a local minimum at \(x=2\) and these are the only local extrema. The graph of \(f\) is illustrated in Figure 5.

Figure 5. Graph of \(y=3x^{5/3}-15x^{2/3}\).
Example 3
Investigate the local extrema of \[f(x)=(x+1)^{2}(x-2)^{3}.\]
Solution
\(f\) is a differentiable function everywhere (because it is the product of two differentiable functions \((x+1)^{2}\) and \((x-2)^{3}\)). Therefore, the only critical points of \(f\) are the zeros of \(f’\).
\[f(x)=\underbrace{(x+1)^{2}}_{u}\underbrace{(x-2)^{3}}_{v}\]
\[\begin{align} \Rightarrow f'(x) & =\underbrace{2(x+1)}_{u’}\underbrace{(x-2)^{3}}_{v}+\underbrace{(x+1)^{2}}_{u}\underbrace{3(x-2)^{2}}_{v’}\\ & =(x+1)(x-2)^2\left[2(x-2)+3(x+1)\right]\tag{factor}\\ & =(x+1)(x-2)^{2}(5x-1)\end{align}\]
Critical points: \[f'(x)=0\Longleftrightarrow x=-1,x=2,x=\frac{1}{5}.\] Now we need to determine the sign of \(f'(x)\):

This sign table shows that \(f\) has a local maximum at \(x=-1\) and a local minimum at \(x=1/5\). Because the sign of \(f’\) does not change in moving from left to right through \(x=2,\) \(f\) does not have a local extremum there. In fact, \((2,f(2))\) is a point of inflection, as we can see from the graph of \(f\) (Figure 6).

Figure 6. Graph of \(f(x)=(x+1)^{2}(x-2)^{3}\). The function has a local max at \(x=-1\) and a local min at \(x=0.2\). The function has no local extremum at \(x=2\), although \(f'(2)=0\).

To determine the sign of the derivative at points near a particular critical point, an alternative method to the sign table is to first substitute a value of the variable  a little less than the corresponding critical point into the derivative formula,  and then one a little greater.

Example 4
Investigate the local extrema of \[f(x)=\sin^{3}x+\cos^{3}x.\]
Solution
This function is periodic with a period \(2\pi\) because
\[\begin{align} f(x+2\pi) & =(\sin(x+2\pi))^{3}+(\cos(x+2\pi))^{3}\\ & =(\sin x)^{3}+(\cos x)^{3}\\ & =f(x).\end{align}\]
Therefore, it is sufficient to investigate the local extrema of \(f\) in one period, say \([0,2\pi]\). Note that \(f\) is differentiable everywhere and
\[\begin{align} f'(x) & =3\cos x\sin^{2}x-3\sin x\cos^{2}x\\ & =3\cos x\sin x\ (\sin x-\cos x).\end{align}\]
\(f’\) is zero wherever \[\cos x=0\quad\text{or}\quad\sin x=0\quad\text{or}\quad\sin x-\cos x=0\] We find the solutions of the above equations in the interval \([0,2\pi]\):
\[\cos x=0\Longleftrightarrow x=\frac{\pi}{2},x=\frac{3\pi}{2}\]
\[\sin x=0\Longleftrightarrow x=0,x=\pi,x=2\pi\]
\[\sin x-\cos x=0\Longleftrightarrow\sin x=\cos x\Longleftrightarrow\tan x=\frac{\sin x}{\cos x}=1\]
Using the unit circle (see Figure 7)
\[\tan x=1\Longleftrightarrow x=\frac{\pi}{4},x=\pi+\frac{\pi}{4}=\frac{5\pi}{4}\]

Figure 7. The equation \(\tan x=1\) has two solutions in the interval \([0,2\pi]\): \(x=\frac{\pi}{4}\) and \(x=\pi+\frac{\pi}{4}=\frac{5\pi}{4}\).

Therefore, the critical points of \(f\) are \[0,\frac{\pi}{4},\frac{\pi}{2},\pi,\frac{5\pi}{4},\frac{3\pi}{2},2\pi.\] Sign of \(f'(x)\) depends on the signs of \(\cos x\), \(\sin x\), and \(\sin x-\cos x\). It is easy to determine the signs of \(\cos x\) and \(\sin x\):

The function \(g(x)=\sin x-\cos x\) is continuous and might change its sign only at its zeros (\(\pi/4\) and \(5\pi/4\)) [Recall that if \(g\) is a continuous function, \(g(a)>0\) and \(g(b)<0\), then it follows from Bolzano’s Theorem  that \(g\) has a zero between \(a\) and \(b\)]. To determine its sign, we choose one test value in each of the intervals \([0,\pi/4]\), \([\pi/4,5\pi/4]\), and \([5\pi/4,2\pi]\).

Now we can determine the sign of \(f'(x)\):

From this table, it is clear that \(f\) has local minima at \(x=\pi/4\), \(x=\pi\), and \(x=3\pi/2\), and local maxima at \(x=\pi/2\) and \(x=5\pi/4\). What can we tell about the behavior of the function at \(x=0\) and \(x=2\pi\)? Because \(f\) is periodic, the fact that \(f\) is decreasing on \([0,\pi/4]\) shows \(f\) is also decreasing on \([2\pi,2\pi+\pi/4\)]. Hence, because the behavior of \(f\) changes from increasing \(\nearrow\) to decreasing \(\searrow\) at \(x=2\pi\), \(f\) has a local maximum at \(x=2\pi\). Analogously we can show \(f(0)\) is a local maximum. The graph of \(f\) is shown in Figure 8.

Figure 8. Graph of \(y=\sin^{3}x+\cos^{3}x\). Local maxima and minima are clear in this figure.
Example 5
The graph of \(f'(x)\) is given. Identify the \(x\)-values of the relative extrema.

Figure 9. Graph of \(y=f'(x)\)
Solution
\(f’\) is defined everywhere and is zero at \(x=-2,x=-1\), and \(x=1\), so these are the only critical points of \(f\).

  • In moving from left to right through \(x=-2\), \(f’\) changes from positive (increasing \(f\) \(\nearrow\)) to negative (decreasing \(f\) \(\searrow\)) so \(f\) has a local maximum at \(x=-2\).
  • Because the sign of \(f’\) does not change at \(x=-1\), \(f\) does not have a local extremum at \(x=-1\).
  • Because the sign of \(f’\) changes from negative (decreasing \(f\) \(\searrow\)) to positive (increasing \(f\) \(\nearrow\)), \(f\) has a minimum at \(x=1\).

The graph of \(f\) is shown below (we will learn more about how to obtain the graph of \(f\) from the graph of \(f’\) later). Note that this is one graph of infinitely many functions whose derivatives are \(f’\) because if we shift this graph vertically up or down $y=f(x)+c$, the graph of \(f’\) remains the same (the derivative of a constant is zero).

Figure 10. Graph of \(y=f(x)\). It has a local maximum at \(x=-2\), and a local minimum at \(x=1\). \(f\) has no local extremum at \(x=-1\).