# How to integrate $\sqrt{1-\sin 2x}$?

I want to solve the following integral without substitution: $$\int{\sqrt{1-\sin2x}} \space dx$$

I have: $$\int{\sqrt{1-\sin2x}} \space dx = \int{\sqrt{1-2\sin x\cos x}} \space dx = \int{\sqrt{\sin^2x + \cos^2x -2\sin x\cos x}} \space dx$$

but this can be written in two ways: $\int{\sqrt{(\sin x - \cos x)^2}} \space dx$ or $\int{\sqrt{(\cos x - \sin x)^2} \space dx}$
and it seems to be pretty far from what the real result is: http://www.wolframalpha.com/share/clip?f=d41d8cd98f00b204e9800998ecf8427ecvsatkj0te&mail=1

Can I get any hints?

EDIT:

Thank you for your answers! So as you all showed, we have:
$\int{\sqrt{1-\sin2x}} \space dx = \cdots = \int{\sqrt{(\sin x - \cos x)^2}} \space dx$
or
$\int{\sqrt{1-\sin2x}} \space dx = \cdots = \int{\sqrt{(\cos x - \sin x)^2} \space dx} = \int{\sqrt{(-(\sin x - \cos x))^2} \space dx}$

combined: $\int{\sqrt{1-\sin2x}} \space dx = \cdots = \int{\sqrt{(\pm(\sin x - \cos x))^2} \space dx}$

so we actually have: $$\int{|\sin x - \cos x|} \space dx$$

I drew myself a trigonometric circle and if I concluded correctly, we have:
1. $\int{\sin x - \cos x} \space dx$ for $x \in [ \frac{\pi}{4} + 2k\pi , \frac{5\pi}{4} + 2k\pi ] , \space k \in \mathbb{Z}$
2. $\int{\cos x - \sin x} \space dx$ for $x \in [ -\frac{3\pi}{4} + 2k\pi , \frac{\pi}{4} + 2k\pi ] , \space k \in \mathbb{Z}$

... which means:
1. $x \in [ \frac{\pi}{4} + 2k\pi , \frac{5\pi}{4} + 2k\pi ] , \space k \in \mathbb{Z}$ :
$$\int{\sqrt{1-\sin2x}} \space dx = \int{\sin x - \cos x} \space dx = -\cos x - \sin x + C$$
2. $x \in [ -\frac{3\pi}{4} + 2k\pi , \frac{\pi}{4} + 2k\pi ] , \space k \in \mathbb{Z}$ : $$\int{\sqrt{1-\sin2x}} \space dx = \int{\cos x - \sin x} \space dx = \sin x + \cos x + C$$

• Both of your ways are actually identical; $\sqrt{a^2} = \sqrt{(-a)^2} = |a|$; they're also essentially identical to Alpha's result. (Note that you can simplify the square root in its final expression just as you simplified it in your integrand) May 7, 2014 at 17:16
• $-\sin \left( 2\,x \right) +1=2\, \left( \cos \left( x+1/4\,\pi \right) \right) ^{2}$ May 7, 2014 at 17:18
• The integral over any interval of width $\pi$ is 2, so there is a $2x/\pi$ term to go with the $\sin x$ and $\cos x$ Aug 20, 2014 at 12:34
• Jan 4, 2017 at 8:30
• Shouldn't the 2nd condition be an Open Interval? Oct 26 at 17:41

## 3 Answers

hint: $1- \sin (2x) = (\sin x - \cos x)^2$

• Good method but one must remember to simplify the integrand to $|\sin x -\cos x|$ and consider both negative and non-negative cases separately. Mar 29, 2015 at 0:34

The result in wolfram is given by : $$\frac{\sqrt{1-\sin(2x)}(\cos x+\sin x)}{\cos x-\sin x}\tag{1}$$ Note your results from simplifying the integration. You want to check that $(1)$ is equal to either$$\int\sqrt{(\sin x-\cos x)^2}\mathrm dx=\int\sin x\mathrm dx-\int\cos x\mathrm dx=-\cos x-\sin x.\tag{2}$$ or $$\int\sqrt{\cos x-\sin x)^2}\mathrm dx=\int\cos x\mathrm dx-\int\sin x\mathrm dx=\sin x+\cos x\tag{3}$$ Notice that $(2)$ and $(3)$ are equal to $(1)$. It is a trigonometric identity. I will show $(2)$ is equal to $(1)$ here. I will leave you to show that $(3)$ is equal to $(1)$.

Proof of $(1)=(2)$: \begin{aligned}&\frac{\sqrt{1-\sin(2x)}(\cos x+\sin x)}{\cos x-\sin x}=-\cos x-\sin x\\&\iff\sqrt{1-\sin(2x)}(\cos x+\sin x)=-(\cos x+\sin x)(\cos x-\sin x)\\&\iff\sqrt{1-\sin(2x)}=-(\cos x-\sin x)\\&\iff \sqrt{1-\sin(2x)}=\sin x-\cos x\\&\iff 1-\sin(2x)=\sin^2 x-2\sin x\cos x+\cos^2 x\\&\iff 1-2\sin(2x)=1-2\sin x\cos x\\&\iff 1-\sin(2x)=1-\sin(2x)\end{aligned} This shows that $$\int\sqrt{1-\sin(2x)}\mathrm dx=-\cos x-\sin x$$even though Wolfram gives you a result that makes you unsure of your own result! Now, just show for yourself that $(1)=(3)$ and you should be convinced that you came up with a much simpler solution than Wolfram.

You could also use that $$\sin(x)=\cos\left(\frac\pi2-x\right)$$ and $$1-\cos(2y)=2\sin^2(y)$$ And take care of the signs.

Which is of course equivalent to the other variants, since $$\sin\left(\frac\pi4-x\right)=\frac{\sqrt2}2(\cos(x)-\sin(x))$$