Solution:
Key idea: The derivative of log(secx+tanx) is secx, which is the other factor of the integrand. So we put t=log(secx+tanx) and the integral becomes ∫tdt.
Step 1 — Differentiate the logarithm.
We use the chain rule: the derivative of logu is uu′.
dxdlog(secx+tanx)=secx+tanxsecxtanx+sec2x
We take secx out of the numerator as a common factor.
secx+tanxsecxtanx+sec2x=secx+tanxsecx(tanx+secx)
secx+tanxsecx(tanx+secx)=secx
Step 2 — Substitute.
We put the logarithm equal to t.
t=log(secx+tanx)
By Step 1, its differential is secxdx.
dt=secxdx
Step 3 — Integrate in terms of t.
The integrand is now just t.
∫secxlog(secx+tanx)dx=∫tdt
∫tdt=2t2+C
Step 4 — Return to x.
We put back t=log(secx+tanx). The logarithm in the question needs secx+tanx>0.
2t2+C=21[log(secx+tanx)]2+C
Therefore, ∫secxlog(secx+tanx)dx=21[log(secx+tanx)]2+C (where secx+tanx>0).