Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
2/pi or pi/2 ?... – Emanuele Paolini Mar 7 '13 at 23:24
Hint: Use WA for the plots – Amzoti Mar 7 '13 at 23:25
sorry I mean pi/2 – Fernando Martinez Mar 7 '13 at 23:28
Would the max and min be where the plots intersect but how do I know what those numbers are wa will not let mee see them... – Fernando Martinez Mar 7 '13 at 23:38
$2\cdot sinx\cdot cosx = sin(2x)$ - apply to derivative – The-Q Mar 7 '13 at 23:52
up vote 2 down vote accepted

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)$

enter image description here

share|cite|improve this answer
Let me know if you're "good" with this question now ;-) – amWhy Mar 8 '13 at 3:08
I am good with it thanks – Fernando Martinez Mar 9 '13 at 17:22
Nice Amy. An illustration as usual makes the answer potent. ;-) – Babak S. Mar 9 '13 at 17:52
Thanks, Babak! good day to you! – amWhy Mar 9 '13 at 17:54

The function $\cos^2 x$ is always $\ge 0$ and always $\le 1$. Find where equality holds and you have found the extreme values.

share|cite|improve this answer
How would I find where the equality hold? – Fernando Martinez Mar 7 '13 at 23:33
That should be pretty simple if you look at a curve of $f(x)=cos(x)$ to see where the function is 1,0, or -1 as any other value will not have as its squared value 0 or 1. – JB King Mar 7 '13 at 23:38
You must know what is the $\cos$ function. Do you know the geometrical meaning of $\cos \alpha$? – Emanuele Paolini Mar 7 '13 at 23:44
$y^2 = 0$ if and only if $y=0$. $y^2 = 1, y\ge 0$ if and only if $y=1$. – Emanuele Paolini Mar 7 '13 at 23:48
Also $2\pi$ is a maximum. – Emanuele Paolini Mar 7 '13 at 23:57

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.$$

share|cite|improve this answer
thanks for the help. – Fernando Martinez Mar 8 '13 at 0:04

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.

share|cite|improve this answer
I like both answers equally.Yes thanks for da help. – Fernando Martinez Mar 8 '13 at 0:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.