TITLE: Integral with trigonometric function
QUESTION [5 upvotes]: I have a problem with this integral
$$\int_\ \frac{\sin 2x }{  \sqrt{4-\cos^2 x}} \, dx$$ 
We can transform it to
$$\int_\ \frac{2\sin x \cos x }{  \sqrt{4-\cos^2 x}} \, dx$$ 
Using substitution $u^2 = 4 - \cos^2 x $ we get
$$\int_\ \frac{2u }{\ u } \, du$$ 
And it gives bad result. Can you point when did i make the mistake ?

REPLY [2 votes]: The result shown by WolframAlpha is
$$
\int\frac{\sin 2x}{\sqrt{4-\cos^2 x}} \, dx
=
\sqrt{2}(\sqrt{7-\cos2x}-\sqrt{7})+\text{constant}
$$
that can be rewritten, discarding additive constants,
$$
\sqrt{14-2\cos2x}=\sqrt{14-4\cos^2x+2}=
\sqrt{4(4-\cos^2x)}=2\sqrt{4-\cos^2x}
$$
This means you made no mistake at all.