Finding the extreme values of a function Hello everyone how would I find the extreme values of the following function.               
$f(x)=\cos^2(x)$  within $0 \leq x \leq 2\pi$
I got the derivative as $f'(x)=-2\sin(x)\cos(x)=0$
I know that $\sin^{-1}(0)=0$ and $\cos^{-1}(0)=\pi/2$
But I am not sure if this is correct as the graph seems to go in a cycle so would there be critical points?
 A: The function $\cos^2 x$ is always $\ge 0$ and always $\le 1$. Find where equality holds and you have found the extreme values.
A: As you said, the critical values $x$ satisfy
$ -2\sin(x) \cos(x) = 0.$
This happens if and only if $\sin(x) = 0$ or $\cos(x) = 0$ hold.
$\sin(x) = 0$ implies $x = 0 + n\pi$ and $\cos(x) = 0$ implies $x = \pi/2 + n\pi$ for some integer $n$. From the condition $0 \leq x \leq 2\pi$, such values are $$x = 0, \pi/2, \pi, 3\pi/2, 2\pi.$$
A: You were on the right track in your post: you differentiated, and to determine the "zeros" of the derivative, you set
$$f'(x) = -2\sin x \cos x = 0$$
$$f'(x) = 0 \implies \sin x = 0 \quad \text{or}\quad \cos x = 0$$
On the interval $0 \leq x \leq 2\pi$, recall that $$\cos x = 0 \implies x = \pi/2\text{or}\;\;x = 3\pi/2; \quad \sin x = 0 \implies x = \pi, \text {or}\;2\pi$$
$$f'(x) = 0 \implies \text{critical values are: }\;\;x \in \{0,\,\pi/2,\,\pi,\,3\pi/2,\;2\pi\} \text{ for}\;\;0 \leq x \leq 2\pi$$
Now, determine, using your original function $f(x) = \cos^2 x$, which of these values in the set above are maximum values, and which of the values of $x$ are minimum values.
Recall that $\cos( 0) = \cos (2\pi) = 1;\;\;\;\cos (\pi/2) = \cos (3\pi/2) = 0;\;\;; \cos(\pi) = -1$.
Now, since $f(x) = \cos^2x,\;$ simply square each of the values above, and note that for each value of these values of $x$, $\cos^2 x = \cos x$, except that for $x = \pi,$ we have that $\cos^2(\pi) = (\cos \pi)^2 = (-1)^2 = 1.$

You should find three absolute maximums where $f(x) = 1\;$ at $x \in \{0, \pi, 2\pi\}$.Since the domain we are given is all $x$ between and including $x = 0, \;x=2\pi$, we have the three maximum values.
And you'll find two absolute minimums where $f(x) = 0\;$ at $x\in \{\pi/2,\;3\pi/2\}$

$\quad f(x) = \cos^2(x)$

A: I like @EmanuelePaolini's answer and think this is the best way to do it.
However, since you are taking derivatives and such in your question, let me try to help you finish what you had started. So you want to find the absolute maximum and absolute minimum of the function $f(x) = \cos^2(x)$ on the interval $[0,2\pi]$. You can find the critical points in the open interval $(0,2\pi)$ by taking the derivative and putting it equal to zero:
$$
f'(x) = -2\cos(x)\sin(x) = 0 \quad \Rightarrow\quad x = \frac{\pi}{2}, \pi, \frac{3\pi}{2}.
$$
We have written down only the solutions that are in the open interval $(0,2\pi)$. 
Now all you have to do is find the values of the function $f$ at these points. You probably have a theorem saying that the absolute minimum and maximum will be attained at the endpoints of the interval or at one of the critical points in between:
$$\begin{align}
f(0) &= 1\\
f(\pi/2) &= 0 \\
f(\pi) &= 1 \\
f(3\pi/2) &= 0.
\end{align}
$$
So the absolute maximum is $1$ and it is attained at $0$ and at $\pi$. The absolute minimum is $0$ and it is attained at $\pi/2$ and $3\pi/2$.
Again: I think that Emanuele's answer is better.
