<s>[INST] Evaluating a Trigonometric Integral without Substitutions I have been tasked with evaluating the integral $$I=\int\frac{\sin(2x)+\sin(4x)-\sin(6x)}{\cos(2x)+\cos(4x)+\cos(6x)+1}dx$$ After substituting first $u=2x$ and then $v=\cos(u)$ and a messy partial fraction decomposition, I get the answer $$\frac{4 \log(\cos(x)) - 2 \log(1 - 2 \cos(2 x)) + 3 \log(\cos(2 x))}{6} + C$$
But given how similar the numerator is to the derivative of the denominator, I suspect there is a much shorter way of going about this involving the identity $$I=\log(\cos(2x)+\cos(4x)+\cos(6x)+1) + \int\frac{3\sin(2x)+5\sin(4x)+5\sin(6x)}{\cos(2x)+\cos(4x)+\cos(6x)+1}dx$$ or something similar and some carefully chosen trigonometric identities. How do I proceed?
 [/INST] First express the integrand in the form
$$\displaystyle\frac{4\sin 3x \sin 2x \sin x}{4\cos 3x \cos 2x \cos x}.$$
For example, the denominator requires $\cos 2x+\cos 4x\equiv 2\cos 3x \cos x$, $\cos 6x+1\equiv 2\cos^2 3x$, and $\cos 3x+\cos x\equiv 2\cos 2x\cos x$.
Thus the integrand is $\tan 3x\tan 2x\tan x$.
What helps now is the little-known identity
$$\tan 3x\tan 2x\tan x\equiv \tan 3x-\tan 2x-\tan x.$$
This starts with
$$\sin 3x\sin 2x\sin x
\equiv \sin 3x(\cos 2x\cos x-\cos 3x)$$
$$\equiv \sin3x\cos 2x\cos x-\cos3x(\sin 2x\cos x+\cos 2x\sin x),$$
and so on.
Thus the result is 
$$I=\ln(\cos x)+\frac12\ln(\cos 2x)-\tfrac13\ln(\cos 3x)+c.$$
The identity $\cos x(1-2\cos 2x)\equiv\cos 3x$ implies the equivalence of this answer and the one given above.
The identity $\tan(a+b)\equiv\displaystyle\frac{\tan a+\tan b}{1-\tan a\tan b}$ yields
$$\tan a\tan b\tan(a+b)=\tan(a+b)-\tan a-\tan b,$$
so this provides an easier route to the main identity.
</s>