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

I have tried for this question to solve it first I tried to separate the numerator but that doesn't work then i tried for substituting the value in the denominator but still I am not able to convert the whole function in terms of the substituted variable function. So please help me out to solve this problem.
 A: After Ninad Munshi 's comment, using
$$\frac{1+\cos (x)}{1-\cos (x)}=t \implies x=\cos ^{-1}\left(\frac{t-1}{t+1}\right)\implies dx=-\frac{dt}{(t+1)\sqrt{t} }$$ the integral becomes
$$I=\int\frac{4 t}{\sqrt{3 t^4-2 t^2-1}}\,dt$$ Now $u=t^2$
$$I=2\int\frac{du}{\sqrt{3 u^2-2 u-1}}=\frac{2 }{\sqrt{3}}\log \left(1-3u-\sqrt{9 u^2-6 u-3}\right)$$
Have a look at formula $2.261$ in "Table of Integrals, Series, and Products"
(seventh edition) by I.S. Gradshteyn and I.M. Ryzhik.
A: First, use the double angle identity $\sin2x = 2\sin x \cos x$ to get that
$$I = \int\frac{2\sin x + \sin 2x}{(\cos x - 1)\sqrt{\cos x + \cos^2 x + \cos^3 x}}dx$$ $$ = \int \frac{(1+\cos x)(-2\sin x)dx}{(1-\cos x)\sqrt{\cos x + \cos^2 x + \cos^3 x}}$$
Now the tricky part is deciding what substitution to choose. Using the substitution $$\frac{1+\cos x}{1-\cos x} = t\implies \cos x = 1 - \frac{2}{t+1}\implies -\sin x dx = \frac{2}{(t+1)^2}dt$$
we can simplify the integral. @ClaudeLeibovici caught my error in the original simplification of my substitution. The correct simplification is 
$$I = \int \frac{4t}{\sqrt{3t^4-2t^2-1}}dt$$
Complete the square on the inside of the square root:
$$I =\frac{2}{\sqrt{3}} \int \frac{2t}{\sqrt{(t^2-\frac{1}{3})^2-\frac{4}{9}}}dt$$
Now let $$t^2 = \frac{2}{3}\cosh \tau +\frac{1}{3}\implies 2tdt = \frac{2}{3}\sinh \tau d\tau$$ which gives us the integral
$$\frac{2}{\sqrt{3}} \int \frac{\frac{2}{3}\sinh \tau}{\sqrt{\frac{4}{9}\sinh^2\tau}}d\tau = \frac{2}{\sqrt{3}} \int d\tau = \frac{2}{\sqrt{3}}\tau$$
leaving us with an answer of 
$$I = \frac{2}{\sqrt{3}} \cosh^{-1}\left(\frac{3t^2-1}{2}\right)+C$$
Plugging back in for $x$ and utilizing $1-\cos x = 2\sin^2\left(\frac{x}{2}\right)$ we get our final answer:
$$I = \frac{2}{\sqrt{3}} \cosh^{-1}\left(\frac{1+4\cos(x)+\cos^2(x)}{4\sin^4\left(\frac{x}{2}\right)}\right)+C$$
A: Let $t = \tan{x\over2}, \;dt ={1\over2} \sec^2({x\over2})dx= {1\over2} (1+t^2) dx$
$$I = \int {-8\over  t\sqrt{3-2t^4-t^8}} dt$$
Let $s = t^4, \;ds= 4t^3dt= \large{4s\over t} dt$
$$I = \int {-2\over s\sqrt{3-2s-s^2}} ds = {2\over\sqrt3}
\log\left({3-s+\sqrt{9-6s-3s^2}\over s}\right)$$
If we let $u = \cot^4({x\over2})$, it simplified a bit:
$$I = {2\over\sqrt3}\log(3u-1+\sqrt{9u^2-6u-3})$$

We could simplify more, by letting $w = \large{3u-1 \over 2}$
$$I = {2\over\sqrt3}\log(2w + 2\sqrt{w^2-1}) = {2\over\sqrt3}\cosh^{-1}w + {2\log2\over\sqrt3}$$
Drop the constant of integration, we get
$$I = {2\over\sqrt3}\cosh^{-1}\left({3(\cot{x\over2})^4-1 \over 2}\right)$$
