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

So I'm supposed to find the area of this

$$\int_0^{\pi/2} |\sin{x} - \cos{2x}| dx$$

and I try setting $\sin x = \cos 2x$ but have trouble solving that. I tried using trig identities.

Is there a simpler way of evaluating this type of problem or do you have to graph it and split it up and find two different integrals every time?

share|cite|improve this question
I've edited your post to include Latex. Please ensure that it is correct - I'm guessing that you mean either for the integral to run from $0$ to $\pi/2$, or from $-\pi/2$ to $0$. – user61527 Sep 2 '13 at 22:30
its supposed to be pi/2 on top and 0 on bottom – J L Sep 2 '13 at 22:32
up vote 4 down vote accepted

Hint: Use the fact that $\cos(2x) = 1 - 2\sin^2x$. Then you will have a quadratic for $\sin x$.

It depends on the situation, but I don't think there is a simpler way of evaluating $\int_a^b|f(x)|dx$ without splitting $[a, b]$ into the sets where $f(x)$ is positive, negative, and zero.

share|cite|improve this answer
i tried that and replaced sinx with x to get 2x^2 + x -1 = 0 to get -1 and 1/2 but when i plug those values into the original equation they dont make sense? – J L Sep 2 '13 at 22:36
Don't replace $\sin x$ with $x$ as you are using $x$ to denote two different quantities. Instead, let $a = \sin x$, then you get $a = -1$ and $a = \frac{1}{2}$. This says that when $a = \sin x = -1$ or $a = \sin x = \frac{1}{2}$, $\sin x = \cos(2x)$. For which values of $x \in [0, \frac{\pi}{2}]$ does this occur? These are the points at which the function $\sin x - \cos(2x)$ can change from positive to negative or negative to positive. – Michael Albanese Sep 2 '13 at 22:38
pie/6? ........ – J L Sep 2 '13 at 22:42
It is pi, but yes $x = \frac{\pi}{6}$ is a point such that $\sin x = \frac{1}{2}$ and therefore $\sin x = \cos(2x)$. Now split your interval into two parts: $[0, \frac{\pi}{6}]$ and $[\frac{\pi}{6}, \frac{\pi}{2}]$. You need to determine whether $\sin x - \cos(2x)$ is positive or negative on each of those two intervals. – Michael Albanese Sep 2 '13 at 22:45
from 0 to pie/6 cos2x is higher so from 0 to pi/6 its cos2x-sinx and from pi/6 to 2/pi its sinx-cos2x am I right?? – J L Sep 2 '13 at 22:48

Note that,

$$ \sin(x)-\cos(2x) \leq 0\quad \forall\, x\in[0,\pi/6] $$


$$ \sin(x)-\cos(2x) \geq 0\quad \forall\, x\in[\pi/6,\pi/2]. $$

So, you can split the integral as

$$\int_0^{\pi/2} |\sin{x} - \cos{2x}| dx = \int_0^{\pi/6} -(\sin{x} - \cos{2x}) dx + \int_{\pi/6}^{\pi/2} (\sin{x} - \cos{2x}) dx =\dots\,.$$

share|cite|improve this answer

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.