An integral problem asked by Abhishek Regmi

Evaluate $\int \tan^2 x \cos 4x \; dx $

Answer:

$\tan^2 x \cos 4x $

$=\tan^2 x (1 - 2\sin^2 2x) $

$=\tan^2 x - 2\tan^2 x \sin^2 2x $

$=\sec^2 x - 1 -2\tan^2 x(4\sin^2 x \cos^2 x) $

$=\sec^2 x - 1 - 8\sin^4 x $

$=\sec^2 x - 1 - 2 (2\sin^2 x)^2 $

$=\sec^2 x -1 - 2(1 - \cos 2x)^2 $

$=\sec^2 x - 1 - 2(1 -2\cos 2x + \cos^2 2x) $

$=\sec^2 x - 1 -2 + 4 \cos 2x - 2 \cos^2 2x $

$=\sec^2 x - 1 -2 + 4 \cos 2x - (1 + \cos 4x) $

$\sec^2 x - 4 + 4\cos 2x - \cos 4x $

So, $\int \tan^2 x \cos 4x \; dx$

$= \int (\sec^2 x - 4 + 4\cos 2x - \cos 4x )\; dx$

$=\tan x - 4x + 2 \sin 2x - \frac{1}{4}\sin 4x + C $