When determining the sign of \(f^\prime\) is difficult, we can use another test for local maximum and minimum values. This test is based on the geometrical observation that when the function has a horizontal tangent at \(c\), if the function is concave down, the function has a local maximum at \(c\), and if it is concave up, it has a local minimum (see Figure 1)

Figure 1: If f has a horizontal tangent at a point and is concave up or down around that point, then f has a local extremum there.
Theorem 1. (Second Derivative Test) Suppose \(f^\prime(c)=0\).

(a) If \(f^{\prime\prime}(c)>0\), then \(f\) has a local minimum at \(c\).

(b) If \(f^{\prime\prime}(c)<0\), then \(f\) has a local maximum at \(c\).


Show the proof …

(a) Suppose \(f^{\prime\prime}(c)>0\). By definition \[\begin{aligned} f^{\prime\prime}(c) & =\lim_{\Delta x\to0}\frac{f^\prime(c+\Delta x)-\cancel{f^\prime(c)}^{0}}{\Delta x}\\ & =\lim_{\Delta x\to0}\frac{f^\prime(c+\Delta x)}{\Delta x}\end{aligned}\] where \(f^\prime(c)=0\) by hypothesis. Because \(f^{\prime\prime}(c)>0\), for sufficiently small \(\Delta x\), we must have \[\frac{f^\prime(c+\Delta x)}{\Delta x}>0.\] Therefore:

  • For sufficiently small \(\Delta x<0\), \(f^\prime(c+\Delta x)\) must be negative. This means  (Increasing/Decreasing Theorem) \(f\) is decreasing \(\searrow\) in some interval to the left of \(c\).
  • For sufficiently small \(\Delta x>0\), \(f^\prime(c+\Delta x)\) must be positive. This means  (Increasing/Decreasing Theorem) \(f\) is increasing \(\nearrow\) in some interval to the right of \(c\).
    Therefore, \(f\) has a local minimum at \(c\). The proof of part (b) is analogous.

 

  • Recall that if \(g\) is continuous at \(c\) and \(g(c)\neq0\), then \(g(x)\) has the same sign as \(g(c)\) for \(x\) sufficiently close to \(c\). Therefore, if \(f^{\prime\prime}\) is continuous at \(c\) and \(f^{\prime\prime}(c)\neq0\), we can say that the function is concave up near \(c\) if \(f^{\prime\prime}(c)>0\) and is concave down near \(c\) if \(f^{\prime\prime}(c)<0\).

 

  • There are three situations where the Second Derivative Test is inconclusive:
    1. \(f^\prime(c)=f^{\prime\prime}(c)=0\)
    2. \(f^\prime(c)=0\) and \(f^{\prime\prime}(c)\) does not exist.
    3. \(f^\prime(c)\) does not exist.

    In these cases, \(c\) may be a local minimum point, a local maximum point, or neither as shown (Figure 2) by the functions \[f(x)=x^{4},\quad f(x)=-x^{4},\quad f(x)=x^{3}.\] For these functions, \(f^\prime(0)=f^{\prime\prime}(0)=0\), but \(x=0\) is a point of local minimum for \(f(x)=x^{4}\), a point of local maximum for \(f(x)=-x^{4}\) and neither a local minimum nor maximum point for \(f(x)=x^{3}\).

Figure 2
Figure 2

 

 

  • Whenever the Second Derivative Test is inconclusive (as in the three situations discussed above) or when the second derivative is tedious to find, use the First Derivative Test to find
    the local extrema.
Example 1
Use the Second Derivative Test to find the local extrema of \[f(x)=\frac{1}{2}x^{3}-\frac{3}{2}x^{2}+1.\]
Solution 1
Let’s calculate the derivative to find the critical points of \(f\): \[\begin{aligned} f^\prime(x) & =\frac{3}{2}x^{2}-3x\\ & =\frac{3}{2}x(x-2)\end{aligned}\] Because \(f^\prime(0)=f^\prime(2)=0\), \(x=0,2\) are the critical points of \(f\).

We previously solved this example using the First Derivative Test. Now we use the Second Derivative Test. \[f^\prime(x)=\frac{3}{2}x^{2}-3x\Rightarrow f^{\prime\prime}(x)=3x-3\] Because \[f^{\prime\prime}(0)=3(0)-3=-3<0\quad(\Rightarrow f\text{ is concave down})\] it follows from the Second Derivative Test that \(f\) has a local maximum at \(x=0\). Similarly, \[f^{\prime\prime}(2)=3(2)-3>0\quad(\Rightarrow f\text{ is concave up})\] and therefore, \(f\) has a local minimum at \(x=2\). The graph of \(f\) is shown below.

Figure 3
Figure 3: Graph of $y=\frac{1}{2}x^3-\frac{3}{2}x^2+1$
Example 2
Use the Second Derivative Test to find the local extrema of \[f(x)=\frac{x^{2}-4x+5}{x^{2}+1}.\]
Solution 2
\[f(x)=\frac{\overbrace{x^{2}-4x+5}^{u}}{\underbrace{x^{2}+1}_{v}}\] \[\begin{aligned} \Rightarrow f^\prime(x) & =\frac{\overbrace{(2x-4)}^{u’}\overbrace{(x^{2}+1)}^{v}-\overbrace{2x}^{v’}\overbrace{(x^{2}-4x+5)}^{u}}{\underbrace{(x^{2}+1)^{2}}_{v^{2}}}\\ & =\frac{4(x^{2}-2x-1)}{(x^{2}+1)^{2}}\end{aligned}\] \[f^\prime(x)=0\Longleftrightarrow x^{2}-2x-1=0\Longleftrightarrow x=\frac{2\pm\sqrt{4+4}}{2}=1\pm\sqrt{2}.\] The critical points of \(f\) are \[c_{1}=1+\sqrt{2}\quad\text{and}\quad c_{2}=1-\sqrt{2}.\] Now we need to calculate the second derivative \[f^{\prime\prime}(x)=\frac{4(2x-2)(x^{2}+1)^{2}-4\left(\frac{d}{dx}(x^{2}+1)^{2}\right)(x^{2}-2x-1)}{(x^{2}+1)^{4}}\] Note that we do not need to calculate \(\frac{d}{dx}(x^{2}+1)^{2}\) because the expression \((x^{2}-2x-1)\) at the critical points is zero: \[f^{\prime\prime}(c_{1,2})=\frac{4(2c_{1,2}-2)\overbrace{(\dots)}^{>0}-4(…)(0)}{\underbrace{(\dots)}_{>0}}\] [\((x^{2}+1)^{2}\) and \((x^{2}+1)^{4}\) are always positive]

This means that the sign of \(f^{\prime\prime}\) at the critical points is the same as the sign of \(2x-2=2(x-1)\). \[\text{sgn}\left(f^{\prime\prime}(1+\sqrt{2})\right)=\text{sgn}(1+\sqrt{2}-1)=\text{sgn}(\sqrt{2})>0\] (\(\Rightarrow f\) is concave up around \(x=1+\sqrt{2}\)). Therefore, \(f\) has a local minimum at \(x=1+\sqrt{2}\). \[\text{sgn}\left(f^{\prime\prime}(1+\sqrt{2})\right)=\text{sgn}(1-\sqrt{2}-1)=\text{sgn}(-\sqrt{2})<0\] (\(\Rightarrow f\) is concave down around \(x=1-\sqrt{2}\)). Therefore, \(f\) has a local maximum at \(x=1-\sqrt{2}\).
The graph of \(f\) is shown in Figure 4.

Figure 4
Figure 4: Graph of $\frac{x^2-4x+5}{x^2+1}$

Example 3
Use the Second Derivative Test to find the local maxima and minima of \[f(x)=2\sin x+\cos2x.\]
Solution 3
Because \(f\) is periodic with period \(2\pi\), we find the local maxima and minima in one period \([0,2\pi]\). To find the critical points, we calculate the first derivative:

\[\begin{aligned} f^\prime(x) & =2\cos x-2\sin2x\\ & =2\cos x-4\sin x\cos x\\ & =2\cos x(1-2\sin x)\end{aligned}\] [Recall that \(\sin2x=2\sin x\cos x\).] \[f^\prime(x)=0\Longleftrightarrow\cos x=0\quad\text{or}\quad1-2\sin x=0\] In one period: \[\cos x=0\Longleftrightarrow x=\frac{\pi}{2},\ x=\frac{3\pi}{2}\] \[1-2\sin x=0\Longleftrightarrow\sin x=\frac{1}{2}\] Using the unit circle, we find out that \(\sin x=1/2\) has two solutions (see Figure 5): \[x=\frac{\pi}{6},\quad x=\pi-\frac{\pi}{6}=\frac{5\pi}{6}.\]

Figure 5
Figure 5: The solutions of the equation $\sin (x)=\frac{1}{2}$ in the interval of $[0,2\pi]$ are $x=\frac{\pi}{6}$ and $x=\pi-\frac{\pi}{6}=\frac{5\pi}{6}$

 

Therefore, there are four critical points:
\[c_{1}=\frac{\pi}{6},\quad c_{2}=\frac{\pi}{2},\quad c_{3}=\frac{5\pi}{6},\quad c_{4}=\frac{3\pi}{2}.\]
Now we calculate \(f^{\prime\prime}(x)\) and find its sign at each critical point. To differentiate \(f^\prime(x)\), it is easier to use the first form of  $f^\prime$, i.e.
\[f^\prime(x)=2\cos x-2\sin2x\Rightarrow f^{\prime\prime}(x)=-2\sin x-4\cos2x.\]
\[\begin{aligned} f^{\prime\prime}\left(\frac{\pi}{6}\right) & =-2\sin\frac{\pi}{6}-4\cos\frac{\pi}{3}\\ & =-2\left(\frac{1}{2}\right)-4\left(\frac{1}{2}\right)\\ & =-3<0.\end{aligned}\]
This means \(f\) is concave down around \(x=\pi/6\) and hence \(f\) has a local maximum at \(x=\pi/6\). \[\begin{aligned} f^{\prime\prime}\left(\frac{\pi}{2}\right) & =-2\sin\frac{\pi}{2}-4\cos\pi\\ & =-2\left(1\right)-4\left(-1\right)\\ & =2>0,\end{aligned}\] meaning \(f\) is concave up around \(x=\pi/2\) and hence \(f\) has a local minimum at \(x=\pi/2\). \[\begin{aligned} f^{\prime\prime}\left(\frac{5\pi}{6}\right) & =-2\sin\frac{5\pi}{6}-4\cos\frac{5\pi}{3}\\ & =-2\left(\frac{1}{2}\right)-4\cos\left(2\pi-\frac{\pi}{3}\right)\\ & =-1-4\cos\left(-\frac{\pi}{3}\right)\\ &\begin{equation*} =-1-4\cos\left(\frac{\pi}{3}\right)\tag{cosine is even}\end{equation*}\\ & =-1-4\left(\frac{1}{2}\right)\\ & =-3<0,\end{aligned}\] meaning \(f\) is concave down around \(x=5\pi/6\) and hence \(f\) has a local maximum at \(x=5\pi/6\). \[\begin{aligned} f^{\prime\prime}\left(\frac{3\pi}{2}\right) & =-2\sin\frac{3\pi}{2}-4\cos3\pi\\ & =-2(-1)-4(-1)\\ & =2>0,\end{aligned}\] meaning \(f\) is concave up and hence \(f\) has a local minimum at \(x=3\pi/2\). The graph of \(f\) is shown in Figure 6.

Figure 6
Figure 6: Graph of $y=2\sin (x) + \cos (2x)$