Evaluate $\int\frac{\sin(x)}{\sqrt{\sin(2x)+2}} \, dx$ I am trying to solve this integral:
$$
\int\frac{\sin(x)}{\sqrt{\sin(2x)+2}} \, dx
$$
In order to solve it, I think that the right technique to use is integration by substitution. Firstly I have converted $\sin(2x) = 2\sin(x)\cos(x)$ and after that I have changed  $\cos(x) = 1 - \sin(x)^2$ and I have replaced $\sin(x) = t$ and the integral becomes
$$
\int\dfrac{t}{1+t-t^3} \, dt
$$
How should I continue?
 A: Substitute $x=t+\frac\pi4$. Then
$$
\int\frac{\sin x}{\sqrt{\sin 2x+2}} \, dx
= \frac1{\sqrt2}\int \frac{\sin t}{\sqrt{1+2\cos^2 t}}dt
 + \frac1{\sqrt2}\int \frac{\cos t}{\sqrt{3-2\sin^2 t}}dt\\
\hspace{10mm}=-\frac12\sinh^{-1}\sqrt2 \cos t +\frac12\sin^{-1}\sqrt{\frac23}\sin t+C
$$
A: Hint:
As $(\sin x+\cos x)^2=?, (\sin x-\cos x)^2=?$
and $\displaystyle\int(\sin x-\cos x)dx=-(\cos x+\sin x)$
and $\displaystyle\int(\sin x+\cos x)dx=?,$
Use
$$\dfrac{2\sin x}{\sqrt{2+\sin2x}}=\dfrac{\sin x-\cos x}{\sqrt{(\sin x+\cos x)^2+1}}+\dfrac{\sin x+\cos x}{\sqrt{3-(\sin x-\cos x)^2}}$$
A: Use $\sin(2x) = 2\cos^2(x)-1$
The denominator becomes $\sqrt{\sin(2x)+2} = \sqrt{1 + 2\cos^2(x)}$.
Now substitute $\cos(x) = t$ and the integral turns into $\int -\frac{dt}{\sqrt{1+2t^2}}$.
Finally, substitute $t = \tan(u)/\sqrt{2}$, $\tan^2(u)+1 = \sec^2(u)$, and $\sqrt{2} dt = \sec^2(u)du$ to change the integral to a standard problem: $-\int \sec(u) du = -\ln \left( \sec(u) + \tan(u) \right) + C$.
A: I'll give you a few hints to work this out. Firstly, note that $2+\sin(2x)=1+(1+2\sin x\cos x)$
Now, $$(1+2\sin x \cos x)=(\sin x + \cos x)^2...(1)$$
$$=2-(\cos x -\sin x)^2...(2)$$
Now, write the numerator as $\sin x=\frac 12((\sin x + \cos x)+ (\sin x- \cos x))$ and separate into two integrals. Now observe that:
$$\frac {d(\sin x+\cos x)}{dx}=\cos x -\sin x$$ and
$$\frac {d(\sin x-\cos x)}{dx}=\cos x+\sin x$$
Can you finish now?
