The basis of the first derivative test is that if the derivative changes from positive to negative at a point at which the derivative is zero then there is a local maximum at the point, and similarly for a local minimum. If $f'$ changes from positive to negative it is decreasing; this means that the derivative of $f'$, $f''$, might be negative, and if in fact $f''$ is negative then $f'$ is definitely decreasing, so there is a local maximum at the point in question. Note well that $f'$ might change from positive to negative while $f''$ is zero, in which case $f''$ gives us no information about the critical value. Similarly, if $f'$ changes from negative to positive there is a local minimum at the point, and $f'$ is increasing. If $f''>0$ at the point, this tells us that $f'$ is increasing, and so there is a local minimum.

Example 5.3.1 Consider again $f(x)=\sin x + \cos x$, with $f'(x)=\cos x-\sin x$ and $ f''(x)=-\sin x -\cos x$. Since $\ds f''(\pi/4)=-\sqrt{2}/2-\sqrt2/2=-\sqrt2< 0$, we know there is a local maximum at $\pi/4$. Since $\ds f''(5\pi/4)=- -\sqrt{2}/2- -\sqrt2/2=\sqrt2>0$, there is a local minimum at $5\pi/4$.

When it works, the second derivative test is often the easiest way to identify local maximum and minimum points. Sometimes the test fails, and sometimes the second derivative is quite difficult to evaluate; in such cases we must fall back on one of the previous tests.

Example 5.3.2 Let $\ds f(x)=x^4$. The derivatives are $\ds f'(x)=4x^3$ and $\ds f''(x)=12x^2$. Zero is the only critical value, but $f''(0)=0$, so the second derivative test tells us nothing. However, $f(x)$ is positive everywhere except at zero, so clearly $f(x)$ has a local minimum at zero. On the other hand, $\ds f(x)=-x^4$ also has zero as its only critical value, and the second derivative is again zero, but $\ds -x^4$ has a local maximum at zero.

## Exercises 5.3

Find all local maximum and minimum points by the second derivative test, when possible.

**Ex 5.3.1**
$\ds y=x^2-x$
(answer)

**Ex 5.3.2**
$\ds y=2+3x-x^3$
(answer)

**Ex 5.3.3**
$\ds y=x^3-9x^2+24x$
(answer)

**Ex 5.3.4**
$\ds y=x^4-2x^2+3$
(answer)

**Ex 5.3.5**
$\ds y=3x^4-4x^3$
(answer)

**Ex 5.3.6**
$\ds y=(x^2-1)/x$
(answer)

**Ex 5.3.7**
$\ds y=3x^2-(1/x^2)$
(answer)

**Ex 5.3.8**
$y=\cos(2x)-x$
(answer)

**Ex 5.3.9**
$\ds y = 4x+\sqrt{1-x}$
(answer)

**Ex 5.3.10**
$\ds y = (x+1)/\sqrt{5x^2 + 35}$
(answer)

**Ex 5.3.11**
$\ds y= x^5 - x$
(answer)

**Ex 5.3.12**
$\ds y = 6x +\sin 3x$
(answer)

**Ex 5.3.13**
$\ds y = x+ 1/x$
(answer)

**Ex 5.3.14**
$\ds y = x^2+ 1/x$
(answer)

**Ex 5.3.15**
$\ds y = (x+5)^{1/4}$
(answer)

**Ex 5.3.16**
$\ds y = \tan^2 x$
(answer)

**Ex 5.3.17**
$\ds y =\cos^2 x - \sin^2 x$
(answer)

**Ex 5.3.18**
$\ds y = \sin^3 x$
(answer)