I don't believe that there is any trigonometric substitution involved here actually.
The integrand secx(secx+tanx)secx(secx+tanx) can be expanded out to get sec^2x +secxtanxsec2x+secxtanx which are actually two simple functions to be antidifferentiated.
int sec^2x dx = tanx + c∫sec2xdx=tanx+c because d/dx(tanx) = sec^2xddx(tanx)=sec2x.
int secxtanx dx = secx∫secxtanxdx=secx which we will prove using substitution.
Expressing that in terms of sine and cosine, we get secxtanx = sinx/cos^2xsecxtanx=sinxcos2x so the integral becomes:
int sinx/cos^2x dx∫sinxcos2xdx, to which we apply the substitution u=cosxu=cosx.
u=cosxu=cosx
:. (du)/dx=-sinx
:. -du = sinxdx
Now, using the change of variable rule, we get:
- int 1/u^2 du
=1/u + c
= secx + c
:. int secx(secx+tanx) dx = secx + tanx + c
And there you have it!