Let t2=tanx
⇒2tdt=sec2xdx
⇒dx=2tdtsec2x
⇒dx=2tdt1+t4
=∫2t21+t4dt
=∫(1+t2−(1−t2)1+t4dt
=∫1+t21+t4dt−∫1−t21+t4dt
=∫1+1t2t2+1t2dt+∫1−1t2t2+1t2dt
=∫1+1t2(t+1t)2+2dt+∫1−1t2(t−1t)2+2dt
Let z=t−1t
dz=(1+1t2)dt
and
let u=t+1t
du=(1−1t2)dt
=∫dzz2+(√2)2+∫duu2−(√2)2
=1√2tan−1(z√2)+12√2log∣∣∣u−√2u+√2∣∣∣+C
=1√2tan−1⎛⎜
⎜
⎜⎝t−1t√2⎞⎟
⎟
⎟⎠+12√2log∣∣
∣
∣∣t+1t−√2t+1t+√2∣∣
∣
∣∣+C
=1√2tan−1⎛⎜
⎜
⎜⎝t−1t√2⎞⎟
⎟
⎟⎠+12√2log∣∣∣t2−√2t+1t2+√2t+1∣∣∣+C
=1√2tan−1(tanx−1√2tanx)+12√2log∣∣∣tanx−√2tanx+1tanx+√2tanx+1∣∣∣+C
∴∫√tanxdx
=1√2tan−1(tanx−1√2tanx)+12√2log∣∣∣tanx−√2tanx+1tanx+√2tanx+1∣∣∣+C