# Let f(x)= sin^2 x +\cos x. Find the critical numbers for f in the interval [0,\pi], and classify...

## Question:

Let {eq}f(x)= \sin^2 x +\cos x {/eq}. Find the critical numbers for {eq}f {/eq} in the interval {eq}[0,\pi], {/eq} and classify each one as a local max, local min, or neither one using the second derivative test.

## Critical Points:

The given function contains a trigonometric sine and a trigonometric cosine function and we need to find out the local maxima and minima. In order to do that we'll find out the critical points by taking the derivative equal to zero. The critical points are always in the domain of the function.

Next, we'll use the second derivative test to find out the local extreme. So, we'll compute the second derivative at the critical point. It states that if {eq}f''(x)>0 {/eq} then that point is the local minima, if {eq}f''(x)<0 {/eq} then that point is the local maxima.

We are given:

{eq}f(x)= sin^2 x +\cos x {/eq}

Take the derivative:

{eq}\Rightarrow f'(x)=(sin^2 x +\cos x)' {/eq}

{eq}\Rightarrow f'(x)=(sin^2 x)' - (\cos x )' {/eq}

{eq}\Rightarrow f'(x)=2 sin x \cos x -\sin x {/eq}

{eq}\Rightarrow f'(x)=\sin x (2 \cos x -1) {/eq}

Set the derivative equal to zero:

{eq}f'(x)=\sin x (2 \cos x -1)= 0 {/eq} gives {eq}\sin x = 0 {/eq} and {eq}2 \cos x -1= 0 {/eq}

Solving we get the {eq}\sin x = 0 \Rightarrow x= 2\pi n , \pi+ 2 \pi n {/eq}

and {eq}2 \cos x -1= 0 \Rightarrow x= \dfrac{\pi}{3}+ 2\pi n , \dfrac{5\pi}{3}+ 2 \pi n {/eq}

It is given the critical numbers are in the interval {eq}[0 , \pi] {/eq}.

Hence, the critical points are {eq}x= 0 , \dfrac{\pi}{3} , \pi. {/eq}

The domain of the given function {eq}f(x)=x^4-18x^2+5 {/eq} is {eq}(-\infty,\infty) {/eq}.

All the critical points are in the domain. Hence, the critical points are {eq}x= 0 , \dfrac{\pi}{3} , \pi. {/eq}

We need to use the second derivative test:

We have {eq}f'(x)=\sin x (2 \cos x -1) {/eq}

Take the derivative:

{eq}\Rightarrow f''(x)=( \sin x (2 \cos x -1))' {/eq}

Apply the product rule:

{eq}\Rightarrow f''(x)=(\sin x)' (2 \cos x -1) +\sin x (2 \cos x -1)' {/eq}

{eq}\Rightarrow f''(x)= \cos x (2 \cos x -1) -2\sin^2x {/eq}

{eq}\Rightarrow f''(x)= 2\cos^2 x -2\sin^2 x -\cos x {/eq}

{eq}\Rightarrow f''(x)=2\cos 2x -\cos x {/eq}

Now {eq}f''(0) = 2\cos 0 -\cos 0= 2-1=1>0 {/eq}

{eq}f''( \dfrac{\pi}{3}) = = 2\cos \dfrac{\pi}{3} -\cos \dfrac{\pi}{3}= - \dfrac{3}{2}<0 {/eq}

{eq}f''(\pi) = 2\cos 2\pi -\cos \pi= 2+1=3>0 {/eq}

It follows, the point {eq}0 , \pi {/eq} are local minima and {eq}\dfrac{\pi}{3} {/eq} is the local maxima.