# Integral of $\int \frac{\sin x (2 \cos x - \sin x)}{2\sin x + \cos x} dx$

Integrate the following integral:

$$\int \frac{\sin x (2 \cos x - \sin x)}{2\sin x + \cos x} dx$$

I have tried it by using by parts by considering the $\sin x$ as first function. Again in the following step i got stuck. Please help me.

• Immediate observation : $$\frac{d(2\sin x+\cos x)}{dx}=c\dots$$ – lab bhattacharjee Mar 22 '15 at 12:46
• again in next step there will be integration of cosx log(2 sinx + cosx).. How to deal with it? – Pratyush Mar 22 '15 at 12:53

Hints First you can notice that:

$$\frac{\sin x (2 \cos x - \sin x)}{2\sin x + \cos x}=\cos x-\frac{1}{2\sin x + \cos x}$$

and remember that it's very useful to make use of $t=tan(x/2)$ for the second integral, and you can find the following primitive :

$$\sin(x)-\frac{1}{\sqrt5}\text{tanh}^{-1}(\frac{t-2}{\sqrt5})$$

• Your first observation is real good ! – Claude Leibovici Mar 22 '15 at 13:40

You can even start from the beginning using the tangent half-angle substitution $t=\tan(\frac x2)$ which will lead to $$\int \frac{\sin x (2 \cos x - \sin x)}{2\sin x + \cos x} dx=\int \frac{8t(t^2 + t - 1)}{(1+t^2)^2(t^2-4t-1)} dt$$ Now continue with partial fraction decomposition taking into account the fact that $t^2-4t-1=0$ has two real roots.

This will let you with a series of quite simple integrals.