# integral of $\int\frac{2\sin(2x)-\cos(x)}{6-\cos^2x -4\sin x}\mathrm{d}x$

so i got this problem $$\int\dfrac{2\sin 2x-\cos x}{6-\cos^2x -4\sin x}\mathrm{d}x$$ now this is what i tried $=\int\dfrac{4\sin(x)\cos(x)-\cos(x)}{6-(1-\sin^2x) -4\sin x}\mathrm{d}x=\int\dfrac{\cos(x)(4\sin(x)-1)}{5+\sin^2x-4\sin x}\mathrm{d}x$

Substituting $\sin x=t$ implying $\int\dfrac{(4t-1)}{5+t^2-4t}\mathrm{d}t$=$\int\dfrac{(4t)}{5+t^2-4t}\mathrm{d}t+\int\dfrac{(-1)}{5+t^2-4t}\mathrm{d}t$

we may now solve second part by substuting for $\arctan( x)$ but what to do with $\int\dfrac{(4t)}{5+t^2-4t}\mathrm{d}t$ ??

-
Hint : $t^2-4t = (t-2)^2-4$ and then put $u := t-2$ –  Amateur Oct 5 '13 at 8:19
The Maple command $$Student[Calculus1]:-IntTutor((4*sin(x)*cos(x)-cos(x))/(6-cos(x)^2-4*sin(x)), x)$$ finds the answer step by step with explanation, starting from the change $u=\sin(x).$ See that link for info. –  user64494 Oct 5 '13 at 8:53
$\large Hint:$ $u \equiv \sin\left(x\right)$.
\begin{align} & \int {2\sin\left(2x\right) - \cos\left(x\right) \over 6 - \cos^{2}\left(x\right) - 4\sin{x}}\,{\rm d}x = \int {4\sin\left(x\right) - 1 \over \sin^{2}\left(x\right) - 4\sin{x} + 5}\,\cos\left(x\right)\,{\rm d}x \\[3mm]&= \int{4u - 1 \over u^{2} - 4u + 5}\,{\rm d}u = \int{4\left(u - 2\right) + 7 \over \left(u - 2\right)^{2} + 1}\,{\rm d}u = 2\ln\left(\left[u - 2\right]^{2} + 1\right) + 7\arctan\left(u - 2\right) \\[3mm]&= 2\ln\left(\sin^{2}\left(x\right) - 4\sin{x} + 5\right) + 7\arctan\left(\sin\left(x\right) - 2\right) \end{align} $+$ a constant.