# How to integrate $\int \frac{\cos(x)}{\sqrt{2+\cos(2x)}} \, dx$

I've tried solving this integral but my solution doesn't match the correct one. Can anyone tell me where my mistake is and explain please?

$$\int \frac{\cos(x)}{\sqrt{2+\cos(2x)}} \, dx = \int \frac{\cos(x)}{\sqrt{-(1-3-\cos^2(x)+\sin^2(x))}} \, dx = \int \frac{\cos(x)}{\sqrt{3-\sin^2(x)}} \, dx$$

followed by substitution: $$y = \frac{\sin(x)}{\sqrt{3}}$$ $$\sqrt{3}\,dy = \cos(x)\, dx$$

$$\int \frac{\sqrt{3}}{\sqrt{3}\sqrt{1-y^2}} \, dy = \arcsin(y) = \arcsin \biggl(\frac{\sin(x)}{\sqrt{3}}\biggr)$$

Thanks.

• In the last line you mean $dy$, don't you? – user Apr 28 at 22:12

We have $$2+\cos 2x=2+\cos^2 x - \sin^2 x=2+1-\sin^2 x-\sin^2 x=3-2\sin^2 x.$$