Given: #intsec(x)/(sec(x)+tan(x))dx#
Multiply by 1 in the form of #(sec(x)-tan(x))/(sec(x)-tan(x))#
#intsec(x)/(sec(x)+tan(x))(sec(x)-tan(x))/(sec(x)-tan(x))dx#
The denominator the difference of two squares:
#int(sec(x)(sec(x)-tan(x)))/(sec^2(x)-tan^2(x))dx#
From the identity #1 + tan^2(x)=sec^2(x)#, we see that the denominator becomes 1:
#intsec(x)(sec(x)-tan(x))dx#
Distributing the secant function gives us two integrals:
#intsec^2(x)dx-intsec(x)tan(x)dx#
The first integral becomes the tangent function:
#tan(x)-intsec(x)tan(x)dx#
Use the identities #tan(x) = sin(x)/cos(x) and sec(x) = 1/cos(x)# on the second integral:
#tan(x)-intsin(x)/cos^2(x)dx#
let #u = cos(x)#, then #du = -sin(x)dx#
#tan(x)+intu^-2du#
#tan(x)-u^-1+C#
#intsec(x)/(sec(x)+tan(x))dx= tan(x) -sec(x)+ C#