Using the following relation,
#-\tan ^2x\=1-\sec ^2x#
#int (1+1-sec^2(x))/sec^2(x)dx#
Applying sum rule,
#int f(x)+- g(x) dx=int f(x)dx +- intg(x) dx#
#\int \frac{1}{sec ^2x)dx+\int \frac{1}{\sec ^2(x\)}dx-\int \frac{\sec ^2(x\)}{\sec ^2(x\)}dx#....... eq(i)
#\int \frac{1}{\sec ^2(x\)}dx=\frac{1}{4}(2x+\sin (2x))#
#\int \frac{1}{\sec ^2(x\)}dx=\frac{1}{4}(2x+\sin (2x))#
#\int \frac{\sec ^2(x\)}{\sec ^2\(x)}dx=x#
Substituting the values in eqn (i) we get,
#\frac{1}{4}(2x+\sin \(2x)+\frac{1}{4}(2x+sin (2x))-x#
Simplifying we get
#1/2 (2x+sin (2x)) - x + C#