This question was asked in Ex 7.6, 13
Integration of tanx

Uday Rawat's image