Solution:
Key idea: The derivative of logx is x1, which is in the integrand. So we put t=logx and the integral becomes ∫sec2tdt.
Step 1 — Substitute.
We put the inner function equal to t; the logarithm needs x>0.
t=logx
Differentiating both sides gives the new differential.
dt=xdx
Step 2 — Integrate in terms of t.
We replace sec2(logx) by sec2t and xdx by dt. The integral of sec2t is tant.
∫xsec2(logx)dx=∫sec2tdt
∫sec2tdt=tant+C
Step 3 — Return to x.
We put back t=logx.
tant+C=tan(logx)+C
Therefore, ∫xsec2(logx)dx=tan(logx)+C (for x>0 with cos(logx)=0).