$$\int\cos x \left(\cos x - 2 \sin x \right) dx$$
I've tried $t = \dfrac{\tan x}2$ but the calculation is very long. I've also tried to use trigonometry to divide the problem even further and then use substitution, still long calculation.
How would you solve this?
Hint : $$ \int\cos x \left(\cos x - 2 \sin x \right) dx=\int\cos^2 x \ dx-\int2\sin x\cos x\ dx. $$ The first integral in the RHS can be evaluated by using identity $$ \cos^2x=\frac{1+\cos 2x}{2} $$ and the second integral in the RHS can be evaluated by using identity $$ \sin2x=2\sin x\cos x. $$