$\int \tan ^{4} x d x$
$\int \tan ^{4} x d x$
We can write above integral as:
$\int \tan ^{4} x d x=\int\left(\tan ^{2} x\right)\left(\tan ^{2} x\right) d x \cdots\left(\right.$ Splitting $\left.\tan ^{4} x\right)$
$=\int\left(\sec ^{2} x-1\right) \tan ^{2} x d x\left(U \operatorname{sing} \tan ^{2} x=\sec ^{2} x-1\right)$
Considering integral (1)
Let $u=\tan x$
$d u=\sec ^{2} x d x$
Substituting values we get,
$\int \sec ^{2} x\left(\tan ^{2} x\right) d x=\int u^{2} d u=\frac{u^{3}}{3}+C$
Substituting value of u we get,
$\int \sec ^{2} x\left(\tan ^{2} x\right) d x=\frac{\tan ^{3} x}{3}+C$
Considering integral (2)
$\int\left(\tan ^{2} x\right) d x=\int\left(\sec ^{2} x-1\right) d x$
$=\int\left(\sec ^{2} x\right) d x-\int 1 d x$
$=\tan x-x+C$
$\therefore$ integral becomes,
$\int \sec ^{2} x\left(\tan ^{2} x\right) d x-\int\left(\tan ^{2} x\right) d x=\frac{\tan ^{3} x}{3}+C-(\tan x-x+C)$
$=\frac{\tan ^{2} x}{3}-\tan x+x+C[\because C+C$ is a constant $]$
$\therefore \int \tan ^{4} x d x=\frac{\tan ^{3} x}{3}-\tan x+x+C$