let tanx = z2 , sec2x dx = 2z dz
therefore I = ∫(z. 2z dz)/sec2x
I= ∫2z21+z4 dz
= ∫{z2+11+z4 } + ∫{z2-11+z4 }
= ∫{z-2+1z2+z-2 } +∫{-z-2+1z2+z-2 }
now,
z2 +z-2 = (z-1/z)2 +2 (for first fraction)
z2 +z-2 = (z+1/z)2 -2 (for 2nd frac.)
replace in previous step then
take z-1/z =t for first frac. and
z+1/z = p for 2nd frac.
then just standard integrals
1st frac. -
dtt2 +2 = √2.tan-1 (t/√2)
2nd frac. -
dpp2-2 = (1/2√2 ).ln(|p-2p+2 |)
substituing for x we get the final ans.