The method of the previous section for deciding whether there is a local maximum or minimum at a critical value is not always convenient. We can instead use information about the derivative $f'(x)$ to decide; since we have already had to compute the derivative to find the critical values, there is often relatively little extra work involved in this method.
How can the derivative tell us whether there is a maximum, minimum, or neither at a point? Suppose that $f'(a)=0$. If there is a local maximum when $x=a$, the function must be lower near $x=a$ than it is right at $x=a$. If the derivative exists near $x=a$, this means $f'(x)>0$ when $x$ is near $a$ and $x< a$, because the function must "slope up'' just to the left of $a$. Similarly, $f'(x)< 0$ when $x$ is near $a$ and $x>a$, because $f$ slopes down from the local maximum as we move to the right. Using the same reasoning, if there is a local minimum at $x=a$, the derivative of $f$ must be negative just to the left of $a$ and positive just to the right. If the derivative exists near $a$ but does not change from positive to negative or negative to positive, that is, it is positive on both sides or negative on both sides, then there is neither a maximum nor minimum when $x=a$. See the first graph in figure 5.1.1 and the graph in figure 5.1.2 for examples.
Example 5.2.1 Find all local maximum and minimum points for $f(x)=\sin x+\cos x$ using the first derivative test. The derivative is $f'(x)=\cos x-\sin x$ and from example 5.1.3 the critical values we need to consider are $\pi/4$ and $5\pi/4$.
The graphs of $\sin x$ and $\cos x$ are shown in figure 5.2.1. Just to the left of $\pi/4$ the cosine is larger than the sine, so $f'(x)$ is positive; just to the right the cosine is smaller than the sine, so $f'(x)$ is negative. This means there is a local maximum at $\pi/4$. Just to the left of $5\pi/4$ the cosine is smaller than the sine, and to the right the cosine is larger than the sine. This means that the derivative $f'(x)$ is negative to the left and positive to the right, so $f$ has a local minimum at $5\pi/4$.
An alternate approach is to compute $f'$ at specific points. Choosing $0$ and $\pi/2$ for $\pi/4$, we find $f'(0)=\cos(0)-\sin(0)=1$, and $f'(\pi/2)=\cos(\pi/2)-\sin(\pi/2)=-1$, so there is a local maximum at $\pi/4$. For $5\pi/4$, we choose $\pi$ and $3\pi/2$. We see that $f'(\pi)=\cos(\pi)-\sin(\pi)=-1$, and $f'(3\pi/2)=\cos(3\pi/2)-\sin(3\pi/2)=1$, so there is a local minimum at $3\pi/2$. $\square$
Exercises 5.2
In 1–13, find all critical points and identify them as local maximum points, local minimum points, or neither.
Ex 5.2.1 $\ds y=x^2-x$ (answer)
Ex 5.2.2 $\ds y=2+3x-x^3$ (answer)
Ex 5.2.3 $\ds y=x^3-9x^2+24x$ (answer)
Ex 5.2.4 $\ds y=x^4-2x^2+3$ (answer)
Ex 5.2.5 $\ds y=3x^4-4x^3$ (answer)
Ex 5.2.6 $\ds y=(x^2-1)/x$ (answer)
Ex 5.2.7 $\ds y=3x^2-(1/x^2)$ (answer)
Ex 5.2.8 $y=\cos(2x)-x$ (answer)
Ex 5.2.9 $\ds f(x) = (5-x)/(x+2)$ (answer)
Ex 5.2.10 $\ds f(x) = |x^2 - 121|$ (answer)
Ex 5.2.11 $\ds f(x) = x^3/(x+1)$ (answer)
Ex 5.2.12 $\ds f(x)= \cases{x^2 \sin(1/x) & $x\neq 0$ \cr 0 & $x=0$\cr}$
Ex 5.2.13 $\ds f(x) = \sin ^2 x$ (answer)
Ex 5.2.14 Find the maxima and minima of $f(x)=\sec x$. (answer)
Ex 5.2.15 Let $\ds f(\theta) = \cos^2(\theta) - 2\sin(\theta)$. Find the intervals where $f$ is increasing and the intervals where $f$ is decreasing in $[0,2\pi]$. Use this information to classify the critical points of $f$ as either local maximums, local minimums, or neither. (answer)
Ex 5.2.16 Let $r>0$. Find the local maxima and minima of the function $\ds f(x) =\sqrt{r^2 -x^2 }$ on its domain $[-r,r]$.
Ex 5.2.17 Let $\ds f(x) =a x^2 + bx + c$ with $a\neq 0$. Show that $f$ has exactly one critical point. Give conditions on $a$ and $b$ which guarantee that the critical point will be a maximum. It is possible to see this without using calculus at all; explain.