Solution:
Key idea: First simplify the fraction inside tan−1 with the double-angle formulas sin2x=2sinxcosx and 1+cos2x=2cos2x, and then the identity tan−1(tanx)=x is used; it holds only when x lies in the principal range −2π<x<2π. C is the constant of integration.
Step 1 — Simplify the fraction.
We replace the numerator and the denominator by their double-angle forms and cancel 2cosx.
1+cos2xsin2x=2cos2x2sinxcosx
1+cos2xsin2x=tanx
Step 2 — Remove the inverse function.
For −2π<x<2π, x is in the principal range of tan−1, so the inverse undoes the tangent.
tan−1(1+cos2xsin2x)=tan−1(tanx)
tan−1(tanx)=x
Step 3 — Integrate.
We use the power rule ∫xndx=n+1xn+1, here for the power 1.
∫xdx=2x2+C
Note: Outside −2π<x<2π, tan−1(tanx)=x−nπ on each interval (nπ−2π,nπ+2π), so the answer there is 2x2−nπx+C.
Therefore, ∫tan−1(1+cos2xsin2x)dx=2x2+C for −2π<x<2π.