# What are the local extrema and inflection points for y = 2sin (x) - cos^2 (x) for [0, 2π]?

Apr 30, 2015

Let $f \left(x\right) = y$

$y = f \left(x\right) = 2 \sin \left(x\right) - {\cos}^{2} \left(x\right)$ for $\left[0 , 2 \pi\right]$

To find local extrema:
Find critical numbers for $f$
$y ' = 2 \cos x + 2 \cos x \sin x$

$y '$ never fail to exist and
$y ' = 0$ when
$2 \cos x + 2 \cos x \sin x = 2 \cos x \left(1 + \sin x\right) = 0$

In $\left[0 , 2 \pi\right]$ this happens at $\frac{\pi}{2}$ and at $\frac{3 \pi}{2}$

Testing:
$y ' = 2 \cos x \left(1 + \sin x\right) = 0$, and the factors: $2$ and $1 + \sin x$ are always non-negative, so the sign of $y '$ matches the sign of $\cos x$

On $\left[0 , \frac{\pi}{2}\right)$ , $y '$ is positive (because cosine is)

On $\left(\frac{\pi}{2} , \frac{3 \pi}{2}\right)$ , $y '$ is negative (because cosine is)

On $\left(\frac{3 \pi}{2} , 2 \pi\right)$ , $y '$ is positive (because cosine is)

So $f \left(\frac{\pi}{2}\right) = 2$ is a local maximum

and $f \left(\frac{3 \pi}{2}\right) = - 2$ is a local minimum.

To find inflection points:
Investigate the sign of $y ' '$
$y ' ' = - 2 \sin \left(x\right) + \left(- 2 {\sin}^{2} \left(x\right) + 2 {\cos}^{2} x\right)$
y'' = -2sin (x) + (-2sin^2 (x) +2(1-sin^2x)
$y ' ' = 2 - 2 \sin x - 4 {\sin}^{2} x$
$y ' ' = - 2 \left(2 {\sin}^{2} x + \sin x - 1\right) = - 2 \left(2 \sin x - 1\right) \left(\sin x + 1\right)$

$y ' ' = 0$ when $- 2 \left(2 \sin x - 1\right) \left(\sin x + 1\right) = 0$

And that happens at $x = \frac{\pi}{6} , \frac{5 \pi}{6} , \frac{3 \pi}{2}$

The factors of $y ' '$: $- 2$ is always negative and $\sin x + 1$ is never negative,

so the sign of $y ' '$ will be the opposite of the sign of $2 \sin x - 1$

On $\left[0 , \frac{\pi}{6}\right)$ , $y ' '$ is positive ($2 \sin x - 1$ is negative)

On $\left(\frac{\pi}{6} , \frac{5 \pi}{6}\right)$ , $y ' '$ is positive ($2 \sin x - 1$ is negative)

On $\left(\frac{5 \pi}{6} , \frac{3 \pi}{2}\right)$ , $y ' '$ is positive ($2 \sin x - 1$ is negative)

On $\left(\frac{3 \pi}{2} , 2 \pi\right)$ , $y ' '$ is positive ($2 \sin x - 1$ is negative)

The concavity changes, so there are inflection points:

$\left(\frac{\pi}{6} , f \left(\frac{\pi}{6}\right)\right)$ and $\left(\frac{5 \pi}{6} , f \left(\frac{5 \pi}{6}\right)\right)$