Rewrite the numerator and denominator with half-angle identities so the fraction collapses to tan(4π+2x); on the given domain the angle stays in the principal branch, so the simplest form is 4π+2x.
The trick with an expression like tan−1(1−sinxcosx) is to turn the messy fraction inside into a single tangent. Once it looks like tan−1(tanθ), the answer is just θ — provided θ sits inside the principal range (−2π,2π) of tan−1. So the plan is: simplify to a tangent, then check the domain.
Step 1 — Express in half-angles
Use the standard double-angle identities:
cosx=cos22x−sin22x,sinx=2sin2xcos2x.
Then, since sin22x+cos22x=1,
1−sinx=sin22x+cos22x−2sin2xcos2x=(cos2x−sin2x)2.
Step 2 — Cancel the common factor
Factor the numerator as a difference of squares:
cosx=cos22x−sin22x=(cos2x−sin2x)(cos2x+sin2x).
So
1−sinxcosx=(cos2x−sin2x)2(cos2x−sin2x)(cos2x+sin2x)=cos2x−sin2xcos2x+sin2x.
Step 3 — Turn it into a single tangent
Divide the top and bottom by cos2x:
1−tan2x1+tan2x.
This matches the tangent-addition formula with 4π, since tan4π=1:
tan(4π+θ)=1−tanθ1+tanθ.
With θ=2x,
1−sinxcosx=tan(4π+2x).
Step 4 — Apply the inverse tangent (and check the domain) …