# How do you find the critical numbers for h(x) = sin^2 x + cos x to determine the maximum and minimum?

Jun 15, 2017

Start by differentiating.

$h \left(x\right) = {\left(\sin x\right)}^{2} + \cos x$

You can use the chain rule on ${\left(\sin x\right)}^{2}$.

$h ' \left(x\right) = 2 \sin x \cos x - \sin x$

Critical numbers occur whenever the derivative equals $0$. Hence,

$0 = 2 \sin x \cos x - \sin x$

$0 = \sin x \left(2 \cos x - 1\right)$

If we solve, we get

$\sin x = 0 \mathmr{and} \cos x = \frac{1}{2}$

This means that

$x = 0 , \pi , \frac{\pi}{3} , \frac{5 \pi}{3}$

Now let's select test points in between to determine where the function is increasing/decreasing.

Test point 1: $x = \frac{\pi}{6}$

$h ' \left(\frac{\pi}{6}\right) = \sin \left(\frac{\pi}{3}\right) - \sin \left(\frac{\pi}{6}\right)$

$h ' \left(\frac{\pi}{6}\right) = \frac{\sqrt{3}}{2} - \frac{1}{2}$

$h ' \left(\frac{\pi}{6}\right) = \frac{\sqrt{3} - 1}{2}$

This is positive, so the function is increasing on $\left(0 , \frac{\pi}{3}\right)$.

Test point 2: $x = \frac{\pi}{2}$

If we evaluate within the derivative, we get:

$h ' \left(\frac{\pi}{2}\right) = \sin \left(2 \left(\frac{\pi}{2}\right)\right) - \sin \left(\frac{\pi}{2}\right)$

$h ' \left(\frac{\pi}{2}\right) = \sin \left(\pi\right) - \sin \left(\frac{\pi}{2}\right)$

$h ' \left(\frac{\pi}{2}\right) = 0 - 1$

$h ' \left(\frac{\pi}{2}\right) = - 1$

Hence, $h \left(x\right)$ is decreasing on $\left(\frac{\pi}{3} , \pi\right)$

Test point 3: $x = \frac{3 \pi}{2}$

$h ' \left(\frac{3 \pi}{2}\right) = \sin \left(2 \frac{3 \pi}{2}\right) - \sin \left(\frac{3 \pi}{2}\right)$

$h ' \left(\frac{3 \pi}{2}\right) = \sin \left(3 \pi\right) - \sin \left(\frac{3 \pi}{2}\right)$

$h ' \left(\frac{3 \pi}{2}\right) = 0 - \left(- 1\right)$

$h ' \left(\frac{3 \pi}{2}\right) = 1$

Hence, $h \left(x\right)$ is increasing on $\left(\pi , \frac{5 \pi}{3}\right)$

Accordingly, we can deduce that minimums will occur whenever $x = \pi \pm 2 \pi n$ and maximums will occur whenever $x = \frac{\pi}{3} \pm 2 \pi n$ AND $x = \frac{5 \pi}{3} \pm 2 \pi n$. This is because a maximum is seen at the point where a function stops increasing and begins decreasing, and a minimum is seen at a point where a function stops decreasing and begins increasing.

A graphical verification yields the same result.

graph{y = (sinx)(sinx) + cosx [-22.8, 22.83, -11.4, 11.38]}

Hopefully this helps!