What’s the integral of ##int [ ( secx ) / ( 1+ tanx ) ] ^2 dx##?

##-1/(1 + tanx) + c##

In order to do this integral, let’s square the top and the bottom, we get:

##int sec^2(x)/(1 + tanx) ^2 dx##

Since the derivative of ##tanx## is ##sec^2(x)##, we can do a u-substitution

##int sec^2(x)/(1 + tanx)^2 dx##

##u = 1 + tanx##

##du = sec^2(x) dx##

The new integral would be:

##int 1/u ^2 du##

This turns out to be ##-1/u + c##, and then we put back the ##1 + tanx## and get ##-1/(1 + tanx) + c##.