Consider the given integral.
I=∫tan4xdx
I=∫tan2xtan2xdx
I=∫tan2x(sec2x−1)dx
I=∫tan2xsec2xdx−∫tan2xdx
I=I1−I2 ……… (1)
Let I1=∫tan2xsec2xdx
Put t=tanx
dt=sec2xdx
Therefore,
I1=∫t2dt
I1=t33+C
On putting the value of t, we get
I1=tan3x3+C
Now,
I2=∫tan2xdx
I2=∫(sec2x−1)dx
I2=tanx−x+C
From equation (1),
I=tan3x3−(tanx−x)+C
Hence, this is the answer.