Question:
Evaluate: $\int \frac{1+\cos 4 x}{\cot x-\tan x} d x$
Solution:
Let I $=\int \frac{1+\cos 4 x}{\cot x-\tan x} d x$
$=\int \frac{1+\cos 4 x}{\cot x-\tan x} d x$
$=\int \frac{1+\cos ^{2} 2 x}{\frac{\cos x}{\sin x} \frac{\sin x}{\cos x}} d x$
$=\int \frac{2 \cos ^{2} 2 x}{\frac{\cos ^{2} x-\sin ^{2} x}{\sin x \cos x}} d x$
$=\int \frac{2 \cos ^{2} 2 x \cdot \sin x \cdot \cos x}{\cos ^{2} x-\sin ^{2} x} d x$
$=\int \frac{\cos ^{2} 2 x \cdot \sin 2 x}{\cos ^{2} 2 x} d x$
$=\int \cos 2 x \cdot \sin 2 x d x$
$=\frac{1}{2} \int[2 \sin 2 x \cos 2 x] d x$
$=\frac{1}{2} \int \sin (2 x+2 x)+\sin (2 x-2 x) d x$
$=\frac{1}{2} \int \sin 4 x+0 d x$
$=\frac{1}{2}-\frac{\cos 4 x}{4}$
Hence, $I=-\frac{1}{8} \cos 4 x+C$